[why]
We added a lot of glyphs in Seti + Custom and the new range Material
Design Icons.
[how]
Create new graphics with generator, see README.md.
Use Inkscape to implant into old image.
Note:
In the totals just the new Material Design Icons are included, the old
(obsolete, to be removed) range is not counted at all anymore.
Also did not change the distribution of the diagram. When we would
create a real sankey diagram (with the actual numbers) all the other
sets would be dwarfted by the new Material Design Icons.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
List comprehension helps with readability. Also add comments that
describe expected data structures of altuni and references. Also bump up
the patcher version number.
[how]
Use list comprehension. Add comments. Change the version number.
[why]
Using `continue` feels inelegant when there's a way to write the if
conditions in add_glyphrefs_to_essential() without necessitating the use
of `continue` while ensuring that the function still works as intended.
[how]
Change the `if` conditions and remove any usage of the `continue`
keyword in add_glyphrefs_to_essential().
[why]
Issue #400 recently reoccurred with the latest build of Input font, and
it turns out the dotless-j part of the small `j` now points to U+0237,
which in turn has an alternate unicode encoding to U+F6BE; overwriting
U+F6BE effectively overwrites U+0237, and in turn, alters the small `j`.
This patch aims to fix that.
[how]
In addition to references, the patcher also checks for alternate unicode
encodings which are returned by the glyph.altuni attribute, adds those
to the essential set of glyphs, and in turn recursively searches for
their references/alternate unicode encodings, making sure to handle
circular references (for example: U+2010 and U+2011 in Input Mono)
[why]
When HHEA and (depending on USE-TYPO-METRIC) TYPO or WIN are not
consistent it is unclear which metric we should trust.
In #1056 the complete font bounding box (i.e. yMin and yMax) has been
compared to the baseline to baseline distances, and in all these cases
the WIN values seem to be best (preserve the glyph bounding box).
font-line report fontname.ttf | grep metrics:
ttfdump -t head fontname.ttf | grep "yM(in|ax)"
[note]
Roboto will still be clipped?! There seem to be ridiculously high glyphs
in there. Did not check which.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The initial font-patcher used the WIN font metrics to determine the cell
height. What has been found was forced into HHEA metrics but without
observing the USE_TYPO_METRICS flag.
That has been changed to use the TYPO metric instead of the WIN metric
when the font wants that. For that the gap value becomes important.
This is the current code. It still has problems to detect the correct
cell height. A more rigorous approach seem to be needed.
[how]
The baseline to baseline distance is what we need as 'cell height', to
fill it completely with the powerline glyphs. This is a little bit
complicated and not really specified, each font rendering application or
engine can handle the font metrics differently. But there are some
common approaches.
So we try to come up with the correct and congruent height, comparing
different metrics and issuing a warning on problematic fonts.
Afterwards we make all metrics equal (even if they were not before),
because our goal is clear now and we impose it onto all platforms.
[note]
Useful resources:
* https://glyphsapp.com/learn/vertical-metrics
* https://github.com/source-foundry/font-lineFixes: #1056
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The -l option tries to improve (especially) the powerline glyphs by
making the baseline to baseline height (cell height) an even number.
But it does so only for 2 of the three possible metrics.
[how]
Assuming the hight is identical for all metrics we just need to add '1'
to all ascender values.
[note]
I'm not sure this does anything. After rounding an odd height might
create a 'sharper' triangle tip, not an even height?
Do not understand the real reason for the -l option.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
More often than not (i.e. almost always) I cancel the release workflow.
The problem is that a release workflow will patch all fonts, and all
fonts will differ (at least in the timestamp) and so the repo will grow
A LOT. Usually you want to be really conciously deciding that the growth
is really warranted, and no automatic can do that.
I guess one could trigger rebuilding the zip archives but not commiting
the newly patched fonts back to the repo, but that is also a strange
situation.
[how]
Release has now only a workflow-dispatch trigger, that must be clicked
if a release workflow shall run.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Although Monofur is monospaced it has one glyph (hyphen) that is
slightly wider than all others. This results in a Monospaced font that
is slightly too wide.
[how]
Ignore the hyphen width.
[note]
Additionally improve (commented out) debug code (shows now hex
codepoint).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If a `Nerd Font Mono` font is to be created we need to make sure the
original font is indeed monospaced. If it is not and we enforce the same
adavnce width on all glyphs they will look very ugly. Fonts need to be
designed to be monospaced.
We spot check only some characteristic glyphs for that.
Hermit Bold has a problem. Although it looks more or less monospaced it
has some glyphs wider than all the others, for example the small letter
`m`.
Creating a `Nerd Font Mono` (a font where all glyphs have the same
width) will either: Add too much space to the right of all the other
(smaller) glyphs, or will have the wider glyphs cut off on the right.
[how]
Add small letter 'm' to the spot check list. Now the patcher will by
default refuse to --mono patch that font.
Also add output of first char that fails the monospace check. This makes
debugging easier.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If a font is problematic to patch as monospaced font, that is detected
but the reporting is maybe not strong enough and gets overlooked.
[how]
Pull font property reporting into dedicated functions.
Use that function additionally in other warning.
[note]
The monospace check uses all glyphs to determine the advance width, but
the actual advance width later ignores some glyphs (that are problematic
in some fonts and are thus ignored, although that glyphs will 'break'
after patching).
This might or might not be useful, I just leave it as it was before.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
99c260831 font-patcher: Fix more 'Nerd Font Mono' too wide
the glyphs 'ij' and 'IJ' are exempted from the advance width
calculation, because some fonts (i.e. Overpass Mono) defines them as two
cell wide glyphs (Hello? 'Mono'?)
For some obscure reason it was 'IJ' and 'J circumflex' that were
exempt, not 'ij'.
[how]
Exempt correct code.
Fixes: #703
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
f240e073f font-patcher: Fix windows Mono family names with --makegroups
the script version did not change, which makes it impossible to say if a
user uses a bugfixed patcher or not.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The previous commit
f240e073f (HEAD -> master, origin/master, origin/HEAD) font-patcher: Fix windows Mono family names with --makegroups
fixed a bug in teh font naming; instead of "NFM" the fonts were named
"NF Mono", which is wrong.
Affected are the fonts patched with --makegroups --mono --windows.
That means 1/4 of the fonts of
* Iosevka
* JetBrains Mono
* mononoki
* Cascadia Code
[how]
Run gotta-patch-em-all with FF 20230101 locally.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Without --makegroups the font family is "Name NFM", but with it enabled
we get "Name NF Mono".
[how]
Mimic the old short-naming also for the groups.
This feels a bit strange, why do we need to specify the names three
times for `inject_suffix()`, slightly different. At some point this
should probably be unified.
def inject_suffix(self, fullname, fontname, family):
"""Add a custom additonal string that shows up in the resulting names"""
In principle Family + Subfamily -> Fullname -> Fontname
Somehow we rename not according to the default rules.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Release workflow for 2.3.0 stopped.
The script generate-webfonts.sh needs fontforge which was not installed.
[how]
Install the (ordinary) fontforge. As we just export the woff we can live
with whatever version is available.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[how]
Icon taken from https://github.com/vlang/v-logo
Edit in inkscape:
- remove shadow
- simulate shadow by cutting right side
- change to black and white
Fixes: #630
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The font was always called 3270.
Having a big company's name in the fontname is scary 😬
See
https://github.com/rbanffy/3270font/issues/60
[how]
Add renaming rule.
Fixes: #1012
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Somehow the `IBM 3270 SemiCondensed` font turn out as
`IBM3270Semi Nerd Font Condensed`.
The 3270 font always had the quirk to have a non-standard style with a
dash. We have specific code to circumvent that.
[how]
After updating 3270 the 'Narrow' had been renamed to 'Condensed' and so
our specific patch did not work anymore.
Adapt the regex to find the new style that needs correction.
[note]
https://github.com/ryanoasis/nerd-fonts/issues/1012#issuecomment-1385497230
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We get very bad names using the old naming algo:
`mononoki BoldItalic Nerd Font Complete`
Also the typographic subfamily is useless (will not be set bu the old
algo)
[how]
Use `--makegroups` which results in correct fullname
`Mononoki Nerd Font Complete Bold Italic`
Related: #575
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Although commit
69e8c0e Add current Material Design Icons
claims that we updated the Cheat Sheet after adding the new Material
Design Icons, that actually did not happen.
[how]
Add new MDI's i_*.sh file to all. That is used by the generate-css that
also generates the cheat sheet web page.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We had a copy of the original Fira Code website.
But all the comments and links are only partially relevant for the Nerd
Fonts patched version, e.g. how to install.
[how]
To reduce confusions do not copy the original readme, but link it.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The info-only option broke with the latest changes.
[how]
Set something to the variable that determines the info only mode.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The JetBrains Mono font has a lot of different families. A lot users install
just all "JetBrainsMono Nerd Font" families, and this can break in a lot
different ways.
[how]
Just turn the feature on in font-patcher (via patch-em-all's config).
Fixes: #542
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>