[why]
With Ubuntu-Regular the fi and fl ligatures are replaced by some font
awesome icons.
The problem is that the font uses the non-standard F001 and F002
codepoints as intermediate referencve to create the actual ligatures
that are at codepoints FB01 to FB04.
[how]
All the normal ligature codepoints (FB00-FB06) are added to the glyph
reference checker and codepoints that are referenced by these are not
patched.
This means that F001 and F002 stay on the original ligatures and the
Font Awesome icons are missing, but this can not be fixed automatically
and would need to 'rewrite' the references inside the font.
Fixes: #1221
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Just run ./generate.
Compare commit
7764e05 Create new octicons.ttf (update to v18.3.0) (2/2)
Fixes: 1213
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some people, for example the `lsd` project, need an icon with a symlink
directory. That has been dropped by Octicons. Our repacking put some
unrelated bookmark icon on that codepoint; but even an empty glyph would
be not ideal.
[how]
Design a file-symlink-directory from file-symlink-file and
file-directory. In this way it fits nicely into the current design of
Octicons.
Sneak that into the unpacked Octicons archive.
Adapt mapping manually to keep as much as possible constant.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
While the commit
7cda32651 font-patcher: Allow to specify custom symbolfont with absolute path
would have allowed to specify the custom glyph font with an absolute
path, it is in fact still not possible.
[how]
The file-exists checks also need to observe the absolute path.
[note]
Normally (with a relative path) the custom font is search for in the
ordinary glyphs directory - but that would mean people need to copy it
there.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When a user want to patch some glyph in, and at that position is already
a glyph, there is no way to overwrite it.
The reason is that --custom glyphs are always patched in --careful, and
there is no --not-careful option to override that.
[how]
Add glyphs via --custom always, except --careful has also been given.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If you add a custom icon it probably has to fit with the rest of the
font. So why should we patch it in completely unscaled?
[how]
Just scale the custom icon like all other icons at least.
If someone wants to add just a symbol or two and keep the glyphs exactly
(more or less) unscaled there are simpler ways than this patcher
script. I believe persons that are able to pre-scale the custom font are
also able to just patch it in. So this option is more for the generic
patching of extra glyphs but they need to be scaled somehow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Box Drawing glyphs need to be carefully scaled. This can not be done
if the glyphs are pulled in via font-fallback I guess.
As people may have the fontconfig set up in a way to prefer the Symbols
Only font these glyphs could overrule other box drawing glyphs that
might fit better.
I'm not really sure about this one, but the glyphs look rather bad
anyhow, because they end up in the 1:1 ascpect ratio cell of the Symbols
Only font.
[how]
Just turn the set off if we patch the Symbols Only font.
Need to swap around two subroutine calls for that; first detect if we
are patching the Symbols Only font (through the font metrics) and then
set the patch sets up.
Fixes: #1210
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Changed link again to refer to the default branch ('master' at the
moment) HEAD and use -O instead of needlessly repeating the file name.
Authored-by: Md. Abdullah Al Maruf <62918360+mk1121@users.noreply.github.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Maybe it is not a good idea to always create the log file, as most
people will never look into it. The main reason for it was the
gotta-patch-em script so that one can check after lots of runs what the
details were.
[how]
Introduce parameter to --debug option.
0 = no debug output
1 = log to file only (previously always selected)
2 = log to stdout only
3 = log to file and stdout (previous default for --debug)
Just specifying --default equals now --debug 2.
The gotta-patch-em runs now with --debug 1.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When font-patcher is on a read only filesystem the pacher can not run.
This is for example the case when fontforge is a AppImage.
[how]
Try if the logfile can be written, and if not disable logging into a
file.
Reported-by: Bliss X. Xu <blissLove8@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Compare commit
7d265161f Make Symbols-Only webfonts available stand alone
Suggestion via Gitter by @Mikle-Bond
Suggested-by: Michael <Mikle_Bond@mail.ru>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
With v3.0.0 we removed some icons and some codepoints have been reused
for a different (expanding) set. We want to show the old (removed) icons
correctly and the new ones also, so we need the old and the new font for
the webpage and reference it accordingly.
For the a new style .nfold (read: nd-olf) is introduced and utilized.
See pairing commit in the gh-pages branch:
Date: Thu May 4 06:01:33 2023 +0200
Update cheat sheet WITH removed icons
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The scale glyph is not the biggest glyph; the bell-slash is a little bit
wider than the design cell...
[how]
Switch to modern ScaleGroups. These determine the virtual combined
bounding box of all glyphs in the group and scale them 'as one'.
Also add some more groups.
Also correct wrong code of one small stuff.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With the Octicons update some codepoint contents changed.
Also some symbols scale still wrong.
[how]
Check fonts and add / drop entries.
Use GlyphsToScale+ to correct position of Github text icon.
Fixes: #1198
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
On some fonts the patcher tries to raise a warning, but it can not.
[how]
The 'overlap' variable can hold a floating point number or be None (if
there shall be no overlap processing. Formerly we output that value
using the {} format, but the logging module does not have that. To
accomodate to different types use repr() instead.
[note]
Also improve some other logging related calls.
Reported-by: Jim Myhrberg <contact@jimeh.me>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some sourcefonts, even that are monospaced, have a `fi` and/or `fl`
ligature that maps into one cell. That looks very strange.
[how]
Partially revert commit
148b0c445 Sunset ligature removal
for the cases that have a one-cell `fi`, `fl`, etc ligature, or a `ldot`
related ligature - that is active by default. Discretionary ligatures or
Stylistic Sets are not changed.
Do the removal on all patched fonts for consistency, not just `Nerd Font Mono`.
[note]
On Noto different subtables are needed for Sans, Serif and Sans-Mono. We
can not set up different configs for each, so all are tried in all fonts
and might fail (this is normal).
Same holds for OpenDyslexic Alta, Regular, Mono, Bold...
Fixes: #1187
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
No casks are created.
We have no "Complete" in the path anymore.
And there is no Windows Compatible.
[how]
Drop all the now-unneeded filtering.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The install script does not install anything after the 3.0.0 release.
[how]
Throw away all the (unused) patches stuff.
Throw away the compat stuff.
Introduce clean find patterns for all three Nerd Font variants.
Use them depending on the user's desire - also adding an option to
install the new proportional variants.
Additionally throw an error when we did not find any file (instead of
just failing in obscure ways).
[note]
Also output version number on runs.
Also remove some unused options in getopts.
Fixes: #1183
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
In the previous commit we changed the way one line metric is choosen
when they do contradict.
This is the only font affected.
[how]
Just run gotta-patch-em. The font now uses TYPO (1000) and not WIN (1697)
anymore.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This reverts commit 621008773c,
and adapts the code to more recent changes (logging, enums).
[why]
Lekton has a too wide line spacing.
Lekton was the only font that selected TYPO but we forced it to WIN,
because not all glyphs fit into the values from TYPO.
But that seems to be wrong. Examining the glyphs that are really bigger
than the TYPO line spaces, these are only graphical glyphs that shall
span multiple lines. So I guess we should revert that change and render
Lekton with the TYPO values.
[note]
https://github.com/ryanoasis/nerd-fonts/issues/1056#issuecomment-1529141863
[why]
After updating the template the concrete README.md's have not been
updated (forgotten).
[how]
Just call standardize-and-complete-readmes.sh
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If we do not have a license file an error will be output, but the
complete script will continue and return success.
[how]
Set mode to exit on error.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>