mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-25 03:32:02 +02:00
generate-font-image-previews: Fit svg canvas to drawing [skip ci]
[why] The generated svg's canvas is far too big. I remember shadowy that one had to resize the canvas manually... [how] Switch back from Actions to Verbs, because only there we can resize the canvas automatically. Note commit 3444b5755 generate-font-image-previews: Fix and Refactor [skip-ci] Verbs seem to be still possible. There is currently no Action for the same thing. So we revert 3444b5755 to Ryan's original code (in principle) with the same verbs. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
2597b4ef3f
commit
0e434c2b9a
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Nerd Fonts Version: 2.3.0-RC
|
# Nerd Fonts Version: 2.3.0-RC
|
||||||
# Script Version: 1.1.0
|
# Script Version: 1.2.0
|
||||||
# Create font previews.
|
# Create font previews.
|
||||||
# All fonts need to be installed (or no preview is generated)
|
# All fonts need to be installed (or no preview is generated)
|
||||||
# Files should end up in the gh-pages branch
|
# Files should end up in the gh-pages branch
|
||||||
@ -43,7 +43,7 @@ generate_preview() {
|
|||||||
fontText=$2
|
fontText=$2
|
||||||
echo "[Generating] $font"
|
echo "[Generating] $font"
|
||||||
sed -e "s/000000/ffffff/" -e "s/sans-serif/${font}/" -e "s/Font Name/${fontText}/" <"$template_svg" >"${output_dir}${font}.svg"
|
sed -e "s/000000/ffffff/" -e "s/sans-serif/${font}/" -e "s/Font Name/${fontText}/" <"$template_svg" >"${output_dir}${font}.svg"
|
||||||
inkscape "${output_dir}${font}.svg" "--actions=select-all;object-to-path;export-filename:${output_dir}${font}.svg;export-do;quit-inkscape" 2>/dev/null
|
inkscape "${output_dir}${font}.svg" -g "--verb=EditSelectAll;ObjectToPath;FileVacuum;FitCanvasToDrawing;FileSave;FileQuit" 2>/dev/null
|
||||||
# svgo "${output_dir}${font}.svg"
|
# svgo "${output_dir}${font}.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ generate_preview_symbols() {
|
|||||||
fontText=$2
|
fontText=$2
|
||||||
echo "[Gen. Symb.] $font"
|
echo "[Gen. Symb.] $font"
|
||||||
sed -e "s/000000/ffffff/" -e "40,80s/sans-serif/${font}/" -e "s/Font Name/${fontText}/" <"$template2_svg" >"${output_dir}${font}.svg"
|
sed -e "s/000000/ffffff/" -e "40,80s/sans-serif/${font}/" -e "s/Font Name/${fontText}/" <"$template2_svg" >"${output_dir}${font}.svg"
|
||||||
inkscape "${output_dir}${font}.svg" "--actions=select-all;object-to-path;export-filename:${output_dir}${font}.svg;export-do;quit-inkscape" 2>/dev/null
|
inkscape "${output_dir}${font}.svg" -g "--verb=EditSelectAll;ObjectToPath;FileVacuum;FitCanvasToDrawing;FileSave;FileQuit" 2>/dev/null
|
||||||
# svgo "${output_dir}${font}.svg"
|
# svgo "${output_dir}${font}.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user