[why]
Some icon sets require mentioning of the original author, and we do this
on the website. But there is no indication that we have that list.
[how]
Remove the comment about the changelog (usually you look at the
changelog at the repo before you install a new font) and substitute it
for a link to the icon repo list.
Related: #1908
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The original / upstream version of DejaVuSansMono does not have the
trigrams at codepoint U+2630 - U+2637. These have been added manually
(together with some Powerline glyphs) with commit
bc1f35949 Updates DejaVu fonts from version 2.33 to 2.37 & adds trigrams (2630 through 2627) (fixes#100)
Unfortunately the newly added glyphs were just copied over from
DejaVuSansCondensed and the width does not match the monospaced width of
DejaVuSansMono: the resulting font is not monospaced anymore (but it
should be, by its name part Mono).
[how]
Take the glyphs again from DejaVuSansCondensed but instead of directly
transferring:
- export glyphs as svg from Condensed font
- in the Mono font set the width of the empty target glyphs to 1233
- import the svgs
- scale the glyphs X to 75% (100% in Y)
- center the glyphs within the width
The exact same glyphs have been used for all 4 fonts.
[note]
Also remove the subdir structure as this is the new way to hold the font
files. Remember to clean the patched-fonts/ directory up before release.
Fixes: #1864
Reported-by: @pmadzik
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When the name to parse has 'for' in it - even when it is in the middle
of a word like 'formidable', 'unfortunate', or, 'forced' the "For" part
will be cut off and separated from the rest.
[how]
The reason is the code to remove 'For Powerline' from font names.
Instead of matching 'For' and 'Powerline' individually and then removing
the 'Powerline' and 'For' token later on (which fails if there is just a
'For' token like with 'Un' 'For' 'Tunate'), we now match only on a 'For'
if it is followed by a 'Powerline'.
To make the removal of the other-token easier later on we rename/unify
the token to be CamelCase.
Fixes: #1877
Reported-by: @mietzen
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Never trust comments :-/
Obviously the code has been changed a bit, and the commend did not
reflect that.
Instead of having two different modes (the variable is gone completely)
it just automatically handles verbantim token different from
non-verbatim token (which must be regexes).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When trying to patch Anka/Coder fontforge reports it can not open the
font file.
[how]
When opening a font file we open all fonts within that file. For a ttf
or otf that is one font, but ttc can contain multiple fonts (of course).
The fontforge open function takes the font filename and the subfont name
in parenteses appended to the font filename. For example
`directory/folder/myfont.ttf` which contains just MyFont, it opens via
`directory/folder/myfont.ttf(MyFont)`.
That algorithm is not very smart, and so this fails
`directory/folder/AnkaCoder-r.ttf(Anka/Coder)` because it assumes the
directory goes up to the last slash and takes `Coder)` as filename.
But instead of using the concrete subfont name we can also specify the
index of the subfont in the font file, and that circumvents the problem.
[note]
The TTC opening feature is not well documented in Fontforge, best
described here:
https://fontforge.org/docs/ui/menus/filemenu.html#the-file-menuFixes: #1879
Reported-by: @oktoling
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We have an obsolete glyhnames.json in the release FontPatcher.zip.
[how]
Packaging the FontPatcher.zip should be the last step when everything
has already been updated.
Some code from the zip-release.yml workflow is copied into the
release.yml :-/ but we need to do it at the exact right time.
Note that we need to commit-push before we call the
github-pages-deploy-action.
[note]
Related: #1868
Reported-by: @subframe7536
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
I guess people do not know this probably, or gloss over it when reading the readme.md.
We would need to throw together something new that maybe utilizes
bin/scripts/fetch-archives.sh
But then, cloning the repo is no good idea in any situation. And how would
people get the new script without cloning. Not sure it's worth it.
Lets see if people complain with this warning.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We want to have this scripts working with the standard MacOS bash, which
is an ancient version 3.
[how]
Change the shebang to `sh` and use checkbashisms and shellcheck.
Afterwards change to `bash` again. See note in the code about
exceptions:
# This script must run with bash 3
# In fact it is checked against `checkbashisms` and no bashisms are
# used, except (because the workarounds are too involved):
#
# - <( ) process substitution
# - read -d option
# - $'\0' to supply a nullbyte to read -d
# - <<< here-string
See also https://askubuntu.com/questions/1059265/whats-the-problem-with-bashisms
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
At the moment we have every font only in one format (ttf or otf), so the
preference option does not do much (does not do anything).
Anyhow, it was there before and maybe at some point we take the multiple
formats up again, and then we are prepared.
[how]
Instead of the previous solution to search for all formats and then try
to remove the duplicates we search first for the desired format and if
we find not one font we search for the other format. This is slightly
different but the outcome is the same.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Vanilla MacOS has just some very old bash 3 installed by default. People
might want to use the install.sh, but not install a newer bash (via
Homebrew for example).
[how]
The `nerdfonts_dirs` array is replaced by a normal bash variable (string)
where the directories are '/' separated. Because there are never
subdirectories in the list but only direct children of 'patched-fonts/'
it is possible to use slash as unique and out-of-band separator.
The `fonts` array is replaced by a function that delivers the list of
files in null-byte separated form. That means we can not manipulate the
list and thus the duplicate checking is dropped. As we do not have any
font in both formats (anymore) it will never happen anyhow.
Dropping the duplicates check also removes the extension preference
option functionality. We keep the now defunct option, though.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Pull some common code out of a nested double case into a function.
That makes the code much more readable (for me).
Also simplify find expression.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
There is some risk that an arbitrary command can be smuggled in and
possibly executed with root rights in some situations.
See PR #1861.
[how]
Use xargs instead of eval to store the predefined filter arguments (that
come as one string) into individual arguments of the find command.
Reported-by: Nick Brady <nbgeniu1@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Fixes: #1795
Tried this already via
7a6b90f1 Add more explicit wording on MD update
but of course that is wrong and has to be changed in the generator
instead.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>