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]
It is better to have a not-abbreviated file name so that one can make
sense out of the name parts, especially when doing a partial patch.
With the previous commit we ended up with all abbreviated names.
The filename length is hopefully not limited, at least not as severe as
the SFNT table entries.
[how]
We need to store the answers somewhere because the naming is only
understood by the FontnameParser object which we throw away soon.
As fallback we still can parse the SFNT table, for example when the old
renaming is used.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Because the newer Preferred/Typographic names ID 16 and ID 17 have not
a very demanding length limit we add the long form of the name
addendum (i.e. Nerd Font, Nerd Font Mono, Nerd Font Propo).
In the more restricted old names ID 1 and ID 2 we use the short forms
(i.e. NF, NFM, NFP).
This seems to be problematic with Visual Studio (Community) 2022 and the
fonts can be selected but are not really used.
The Postscript family name is never shortened which seems to be of no
consequence, but still is different than the other.
[how]
When creating the Preferred/Typographic Family (ID 16) we check the
shortening mode first and abbreviate the parts as needed and alike ID 1.
This will also change the filenames, because they base on the SFNT
table. We can not change that without changing the whole mechanism.
[note]
Also add new tool that lists all names of fonts, including the
Postscript ones.
Fixes: #1242
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
They renamed
M Plus Code Latin -> M Plus Code Latin50
M Plus Code Latin Expanded -> M Plus Code Latin60
The versioning is rather divers, add more information into the font
specific README file.
Fixes: #1333
Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When viewed on a small screens the contributors page on the gh-pages
looks not very nice and overflows.
[how]
Instead of a table with a predefined number of rows we just use blocks
in an inline context that allows the line break to adjust to the
available width.
Fixes: #1399
Reported-by: Vitthal Gund <@VitthalGund>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some PS weights have a dash in the weight, like 'Extra-Light' in
Iosevka. The parser can not parse it because it expects 'ExtraLight'.
[how]
Filter out all '-' and ' ' from the PS weight string before actually
parsing the string.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When the weight check fails for some input the reason is not shown
correctly (i.e. not the string that actually failed).
[how]
Display exactly the failed string in the warning.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When the font does not have a PSweight string the font-patcher bugs.
[how]
Rewrite the code to be more robust against unexpected weight values.
Also make detected problems non-fatal.
Reported-by: František Hanzlík <frantisek_hanzlik@protonmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Material Design Icons moved codepoints around the Nerd Fonts v3
transition. In the latest v2.x releases both codepoint ranges were
present, and so we had the MD icons with different names and sets and
codepoints in two different i_*.sh files.
Since the old MD codepoints have been dropped the i_material.sh is not
actively used anymore - well, it is used to create the 'marked as
removed' entries in the cheat sheet.
That has not been properly documented here.
Reported-by: @midnightrocket:gitter.im
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We struggle with the pack-committing of patched fonts to the repository
on release. This makes our repo grow extremely big. It would be better
to just use release artifacts for the releases and not commit any
patched font back.
There were different approaches discussed, but the problem remains that
I personally have no rights to implement anything of that - neither can
I force push to the default branch, nor can I create new repos in the
organization.
[how]
To make it still possible to add new fonts without a repo size
explosion we do not release NEW fonts back to the repository as commits,
but old fonts are handled as before.
NEW fonts:
* have a new property set in the fonts.yaml 'database'
* are released as release artifact via release workflow (but not
committed back)
* get a readme in the patched_fonts/ directory that points to the
release artifact page
The solution is not ideal, but for sure better than not adding any fonts
anymore or having the repo grow in size faster and faster.
At some point in time I would like to phase out all in-repo releases,
also for OLD fonts.
This scheme has been (manually) used / introduced for Intel One.
With this change the .gitignore file is automatically adapted to any new
font that is added with the repoRelease flag set to false (which should
be the default for any added font from now on).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.
That raises problems with the fonts on Windows.
[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.
See Issue #1333 and PR #1358.
Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some fonts will not be released to the repo; but only exist patched as
release atrifacts. This needs adapted readmes.
[how]
If such a font is encountered direct links to the release archives are
put into the readme file.
Decide based on information in the font.json file.
If no info is found in the json file (i.e. all existing fonts) it
defaults to release-also-to-repo behavior.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We have a lot duplicated code here.
[how]
As the to and to-dir never changes we can assign that outside all the if
cases.
We can also always just add the extra information to the (only one,
independent of number of incoming data files) output after all the ifs.
Note that this also adds the extra information if we had no readme at
all. Previous code would not add anything to that (for whatever reason).
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]
When we rename "Envy Code R" to "EnvyCodeR" this is detected as RFN
relevant name change, which it is not.
[how]
Compare the blank removed lower cased names.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
The font has RFN, but we are allowed to use the patched name
"Envy Code R Nerd Font", see PR #1318.
Thanks go to Damien Guard!
Fixes: #1205
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The readmes in the zip and tar.xz archives differ. The zips have only a
very small and generic `readme.md`. The tar.xz have that readme as well as
the `README.md` from the patched-fonts/ directory. This should be the same
for both.
To have two files with names that just differ in case (`readme.md` and
`README.md`) can be problematic on some platforms.
[how]
Combine both readmes into one file - put the generic info in the top of
the readme.
Also include the RELEASE_VERSION if known into the readme. That makes it
more easy to identify which Nerd Font release that archive came from.
RELEASE_VERSION is set in the release workflow.
Fixes: #1284
Reported-by: Jan Klass <kissaki@posteo.de>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Now where we have zip and tar.xz archives one might want to just fetch
one specific one. So we need to have a pattern not only for the
beginning of the file name.
[how]
Enable full regexes for the filtering.
For this we need to escape blanks in the pattern/regex, that a user
might specify (./fetch-archive.sh v2.2.2 'Some Font').
[note]
This is already then used for the casks workflow, as that only needs the
zips.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>