[why]
For testing we might want to execute one command (e.g. font-patcher run)
once for each source font. We need to decide which of the font files is
a good choice.
[how]
Best would maybe to use the font that is used for the image previews.
We add that information for each font into the 'database'. Then we can
for example do stuff like:
while IFS= read -d $'\n' -r f; do
ls -l ../../src/unpatched-fonts/"${f}"
done < <(jq -r '.fonts | .[] | ."imagePreviewFontSource"' lib/fonts.json)
This is already utilized for the helper tools that are hid in the
generate-font-image-previews.sh script.
Note that DaddyTimeMono and NerdFontSymbolsOnly has "--ext ttf" set in the
config, so the information provided for that fonts is wrong.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
in generate-font-image-previews.sh line 22:
if [ "$imagePreviewFont" != "$patchedName Nerd Font" -a "$imagePreviewFont" != "$patchedName NF" ]; then
^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
For more information:
https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we changed the naming for Visual Studio all the name entries use a
shortened name if the font needs the shortened name for the ID1/2
names.
This means sometimes the family name ends in NF and there is no
differing (long) family name anymore.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Verbs have been dropped from Inkscape with version 1.2
[how]
Use actions instead. I'm not sure how well that works with older
Inkscapes now, but ... sigh
[note]
Also add missing helper for font filenames for Intel One Mono.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Bold font is bad?
The repo is not maintained?
[how]
The ComicShannsMono is not monospaced ... fix it.
It has Overlapping contours ... fix it.
Create a useful BOLD face.
This was originally PR #1004
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some font previews in the gh-pages are obviously wrong (showing some
fallback font).
[how]
Recreate all image previes from current master branch.
To make this more easy:
- Add commented out code that displays command to install just the
needed fonts but all the needed fonts
- Add commented out code that displays the family names of the needed
fonts - these have to be in sync with the fonts.json database
Fixes: #489
Reported-by: CosmosAtlas
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[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>
[why]
We do not have a preview for the Symbols Only font.
The Symbols Only font appears two times (with 1000 and with 2048 EM).
[how]
Remove one of the occurences of NerdFontSymbolsOnly in the fonts.json.
The font matrix (for CI) still works, and we get only one entry in the
fonts list on the gh-pages.
Change the entry details accordingly.
Create special svg template that includes lots of symbols.
Change the destination filename to be imagePreviewFont instead of the
patchedName + "Nerd Font". The website (gh-pages) expects the former
file names.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
There are two svg tempates, one with and one without Inkscape metadata.
[how]
The metadataless files is fine and opens ok in Inkscape.
There are no real differences between the two templates.
Drop the Inkscape one.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The script is not running with current (i.e. year 2022) release versions
of Inkscape.
The script does not warn if a font is not installed (and creates a
garbage preview instead).
[how]
Rewrite the script that is uses Inkscape actions instead of verbs. Verbs
are already removed in Inkscape HEAD.
Check if needed font is indeed installed.
Do not generate useless Symbols Only font preview (it needs a specific
different one, I suppose).
Disable `svgo`. Maybe we should generate PNGs instead?
Change path for created images, so that it is already correct for the
gh-pages and we could use the github-pages-deploy-action to publish them.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>