[why]
We have three ways to create a patched font
- 'normal' (i.e. monospaced oversized symbols): Nerd Font
- 'mono' (i.e. strictly monospaced small symbols): Nerd Font Mono
- 'proportional' (i.e. proportional symbols): Nerd Font Propo
The first two variants have a name, the third one has no name, it is
also called 'Nerd Font' (and it was THE font, for v2.1.0 (only)).
[how]
Invent and set new name, so that all variants have different names.
Makes refering to them explicit.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we crate a font we take the OriginalName, add "Nerd Font" and which
patches we applied, and add "Mono" if --mono has been specified:
OriginalName Nerd Font Complete Mono
OriginalName Nerd Font plus Weather Mono
But the 'Mono' part is quite important, but this scheme will put it in a
place where it is easily out of view or has been removed (to keep the
name short).
This truncation is especially bad on Windows Compatiple and when the
user installs both the 'Nerd Font' and the 'Nerd Font Mono':
SomeVeryLongFontName Nerd Font Complete
SomeVeryLongFontName Nerd Font Complete Mono
become after truncation
SomeVeryLongFontName Nerd Font Comp.ttf
SomeVeryLongFontName Nerd Font Comp.ttf
[how]
Always put the "Mono" directly after "Nerd Font" and all the other name
components come later.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Any non-monospaced font will not be be patched, the patcher crashes.
[how]
This must have happened when the box drawing characters rescaling
feature has been disabled. The default value (False) is not always set.
The box drawing patch has the ability to rescale existing box glyphs.
That used to be done when all box glyphs are already existing in the
source font. We do not patch in a new glyph set then, but we rescale the
existing glyphs to match the possibly new cell size.
But that feature is disabled and the attribute 'dont-copy' is never
utilized. It is disabled because some existing box sets are rather ...
sspecial in their overlap and can not be scaled as we would scale them.
Fixes: #1170
Reported-by: Henrique Monteiro <hrqmonteiro@protonmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some old applications seem to depend on obsolete xAvgCharWidth values to
show two-cell glyphs correctly. Fontforge can only generate OS/2 tables
version 4, but these applications need 2 or less. In fact they seem to
not look up the version number, but rely on the value being like it
always has been ;-)
One example is Windows notepad, that takes the xAvgCharWidth as base for
the cell size and draws the two-cell chars in a cell twice that size -
without any regard to glyph width.
[how]
These issue seems to be encountered rather seldom and only with some
obscure (grin) applications. There is also no good way to handle this
automatically. So we add a command line option that allows the user to
tweak the value after patched-font generation.
The option is called `--xavgcharwidth`:
* If not specified the behavior of the patcher does not change
* If just given the xAvgCharWidth is copied over from the source
* If a number is added that number is used as xAvgCharWidth
* If the number added is zero we will calculate the old style xAvgCharWidth
Fixes: #522
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we have a ttc and tweak the contained fonts we recalculate the
total checksum after each tweak while we only need to tweak it after all
changes (included fonts) have been tweaked.
[how]
Pull the total checksum recalculation out of the subfonts loop.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Both are full fledged families, one specifically for terminal, the other
not. Although it might be that people want both there is a likelyhood
that some just need one set.
Splitting these makes the individual release packages smaller and more
handable, and improves release workflow run time.
[note]
Also fix RFN of mononoki en passant :-}
See comment on mononoki's RFN with the mononoki 1.6 update commit.
See also #803
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Also drop all the bitmap fonts that we have in src/unpatched-fonts/ but
we do not do anything with them.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
They started with new version numbering and have different version on
each subset.
The complete naming set changed. See their website to find the font you
used before.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Forgot to include this in the previous commits and accidentially pushed
them directly to master.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
After the initial locking of many issues (where we called the workflow
once every hour, it can only process 50 items in one run), this high
frequency is not needed anymore.
[how]
Just search for old closed issues once a week on monday morning.
Also remove manual trigger.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Sometimes people comment on (long) closed issues because they have
similar problems. But that is often just a me-too, and all the details
to reproduce the issue are missing.
[how]
Lock old closed issues and add some comment that a new issue should be
opened instead.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some glyph names in the CSS/cheat-sheet/json database are wrong.
[how]
For the wheather icons: Check against the glyph names in the original
repo's CSS.
For the Octicons: Check against glyph name in the symbolfont.
Did not check all glyphs, just the two reported ones.
Fixes: #1146
Reported-by: page-down
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
It does probably not make too much sense to add the box drawing glyphs
to proportional fonts. The boxes that are drawn need to be filled with
some text, and if that does not have monospaced property the box will
always look ugly and not fit and change when the font is changed.
[how]
Make the fact if we detect a source font as monospaced or not a property
of the patcher object.
Always determine that property (before we just determined it when the
target font should have monospaced behavior).
Use that new property to enable/disable the box drawing glyphs.
In a way it is now also prepared to add that as command line parameter
should the need for that arise.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Normally the 'cell' size should not change on patching. If the 'cell'
size does not change we do not need to rescale the box glyphs. They
probably worked before, they work the same afterwards.
Another reason to disable this is Cascadia Code. It has box drawing
glyphs that extend for more up then the normal cell. If we rescale that
to fit a probably new cell size we get a 'midline' that is too low
(because the upper stems are longer).
[how]
Leave the code in, but disable 'just scale do not copy' mode.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We have 2 different types of metrics warnings. When one warning has been
issued the other is not displayed (if it would trigger). The reason was
that I thought normally there would be no warnings and if someone would
have to inventigate the sourcefont anyhow.
[how]
But the warnings are quite common, so differentiate a bit more when
generating.
Also improve one warning message to make clear what the warning is
about.
And fix the assignment of advance width to width; which has no
consequence because it is never used (at the moment). But it was
obviously wrong.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>