Commit graph

1916 commits

Author SHA1 Message Date
Finii
c68d1d57be [ci] Update FontPatcher.zip 2023-04-24 17:56:55 +00:00
Fini Jastrow
ab18a8135a font-patcher: Raise loglevel of VF message
[why]
When we expect the result to be trash we should say it's critical
(fatal).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-24 19:52:27 +02:00
Fini Jastrow
a96006a681 font-patcher: Add option to allow italic-less fonts with oblique
[why]
Because we do not know if a complete family of fonts has an italic face
we must always assume it does. To get clean RIBBI families in ID1/2 we
create a different family for the oblique slant.
But that is not needed if the font does not have an italic slant, but
just an oblique one (like Bitstream Vera and descendants).

[how]
Add new command line option for font-patcher that specifies if the
family of fonts should be patched under the assumption that there might
be an italic face (default), or if we are sure there is none (and we can
leave oblique in the RIBBI group).

This is then applied to the config.cfg files.

Note that this does not take into account any other of the known_slants.
But they are not encountered in any of our prepatched fonts.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-24 19:52:27 +02:00
Fini Jastrow
f603633536 name-parser: Fix Oblique handling
[why]
Oblique is not detected correctly anymore.

[how]
With commit
  ae656bad8 name-parser: Further formalize style handling

'Oblique' has been taken out of the direct 'known_names' which has been
replaced by a more detailed list of known name parts. It ended up in
known_slopes.

But known_sloped is not taken into consideration as 'weight' when parsing
the font name - no it ends up in 'rest'.

This has been obviously overlooked.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-24 19:52:27 +02:00
Finii
fd416d480d [ci] Update FontPatcher.zip 2023-04-24 16:45:32 +00:00
Fini
20e7a8e390
Merge pull request #1028 from ryanoasis/feature/reorganize-naming
Pull 'Mono' to front in names and other naming changes
2023-04-24 18:42:33 +02:00
Fini Jastrow
2af746a135 name-parser: Do not shorten PS-name more than PS-family-name
[why]
It's not nessecary to shorten the PSname so much when no shortening is
in place otherwise. This has been thought of as a good idea, because
noone really cares about the PSname and we can avoid any problems. But
checking with the current set of sourcefonts and using the current
shortening options, keeping it longer is never a problem.

It would be a problem for the Fullname ID4 before, and so we always
shorten more.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-24 13:01:27 +02:00
Fini Jastrow
a044611194 Remove name_parser_test scripts
[why]
The systematic evaluation of all fonts is finished and we do not need
any comparison with the old naming anymore.

This can partially replaced by something like

NERDFONTS='--debug --dry --makegroups 1' ./gotta-patch-em-all-font-patcher\!.sh -cv /iA-Writer | grep '==='

[note]
Also update query_names helper to what I used recently with length
indicators.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-23 13:44:14 +02:00
Fini
deecea3dbd
Merge pull request #1175 from ryanoasis/feature/AnonymousPro
Update Anonymous Pro
2023-04-22 07:57:46 +02:00
Fini Jastrow
4921e59554 Drop iA Writer Duospace
[why]
We have both
 iA Writer Duospace
 iA Writer Duo S

These are the same fonts, Duospace is just the former name of Duo S.

Duospace is version 1.005
Duo S (and Mono and Quattro) is version 2.000

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
e27f39593e font-patcher: Add debug mode
[why]
Some messages are not useful in all cases, and we want to hide them.
On the other hand there are messages that we want to only hide in
--shutup mode. Hmm.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
54da3a5860 font-patcher: Add dry run mode
[why]
To check just the naming and other stuff it is good to not patch (and
not store) the resultant font.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
b290dbf612 font-patcher: Fix logging messages while startup
[why]
When we still process the arguments we do not have a real logger object.

[how]
Use the default (root) logger in these cases.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
921fadaad9 name-parser: Unify name related error message format
[why]
It is hard to grep for all naming related errors, because there is no
common format.

[how]
Make them also visually similar and error cases easily spotted.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
5c3bfbc2e0 font-patcher: Fix creation of Propo font with old naming
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
b9a4b2ebbd gotta-patch-em: Add Nerd Font Propo
[why]
After skipping the creation of 'Windows Compatible' fonts we have room
to finally add 'Nerd Font Propo' to the release patch sets as first
class citizen.

[note]
Also add undocumented feature that environment variable $NERDFONTS can be
used to supply additional or differing options (last option wins).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
7c62c71267 font-patcher: Drop "Windows Compatible"
[why]
The fonts generated with --makegroups work on all platforms, so there is
no need for options --windows and --also-windows anymore.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
17c835c630 Select specific shortening mode for some fonts
[why]
Most fonts can run with the full naming (--makegroups 1).

But for some (especially with full fledged subfamilies) the names become
too long. Here we need to select more shortening.

[how]
This can be either done/stored in the font-patcher script, but if you
need shortening (and which) still depends on what set of fonts you want
to patch.
So instead we make it a config.cfg option of the unpatched-fonts.

[note]
Findings:

3270                   2
Agave                  1
AnonymousPro           1
Arimo                  1
Aurulent               1
BigBlueTerminal        1
BitstreamVera          too long, and has RFM
CascadiaCove           4
CodeNewRoman           1
Cousine                1
DaddyTimeMono          1
DejaVuSansMono         1
DroidSansMono          1
FantasqueSansMono      1
FiraCode               2
FiraMono               1
Gohu                   1
Go-Mono                1
Hack                   1
Hasklig                2
HeavyData              1
Hermit                 1
iA-Writer              PROBLEM Quattro / Duospace
IBMPlexMono            1
Inconsolata            1
InconsolataGo          1
InconsolataLGC         1
Iosevka                4 (would also work with 3, but keep same with Term)
IosevkaTerm            4
JetBrainsMono          4
Lekton                 1
LiberationMono         1
Lilex                  1
Meslo                  1
Monofur                1
Monoid                 1
Mononoki               1
MPlus                  2, latX -> 3
NerdFontsSymbolsOnly   1
Noto                   5, but!! "ExtraCondensed ExtraLight Italic"
OpenDyslexic           1
Overpass               2
ProFont                1
ProggyClean            1
RobotoMono             3
ShareTechMono          1
SourceCodePro          4
SpaceMono              1
Terminus               1
Tinos                  1
Ubuntu                 2
UbuntuMono             2
VictorMono             4

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
e2abaaf53f font-patcher: Correct usage hint
[why]
As we introduces a default --makegroups value of 1 the solution to a
problem can not be omitting the option but the user needs to
specifically call it with value 0 instead.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
bd5c74b5c9 font-patcher: Use makegroups per default
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
0ffb095ffe name-parser: Add more renaming rules
[why]
Some fonts have so long base names that we can not, even very
abbreviated as 'NF', add the Nerd Font designator anymore.

In this case we need to rename the font even if it has no RFN just to
make it shorter.

[note]
As '(TTF)' is dropped now from Terminus we do not need to handle it
specifically anymore.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 19:55:57 +02:00
Fini Jastrow
190732b5fd Anonymous Pro: Add missing renaming info
This is used by standardize-and-complete-readmes.sh

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 18:38:47 +02:00
Fini Jastrow
fd7773c092 Update Anonymous Pro
[why]
We use a prepatched font not the original Anonymous Pro.
The prepatched font contains no bitmaps and is thus like
Anonymous Pro Minus. Also some font internals that fontforge does not
copy out of the box are differing.

And we miss the Bold and Italic variants.

[how]
Crossgrade to original Anonymous Pro as source and add the missing
weight/style.

Add Anonymous to SIL.
Handle 'Pro' naming parts (do not detect 'r' as short for 'Regular').

[note]
Maybe related: #1174

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-21 13:07:50 +02:00
Fini Jastrow
848ed2500a name-parser: Fix SIL replacements
[why]
If the font name is changed in a way where it now ends in a blank (for
example because 'Name Momo' got 'Momo' dropped: 'Name '), that blank is
not removed immediately.
Well, it is later on, but anyhow.
This can only happen on malformed SIL entries. But we want to have a
correct replacement anyhow.

[how]
Remove trailing whitespace after replacements.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-20 15:52:19 +02:00
Fini Jastrow
1da85df08b font-parser: Fix CodeClimate workaround
[why]
CodeClimate does not allow 'complicated' functions. In a previous commit
we added more if-s to a function that afterwards was rejected by
CodeClimate. To fix that the if-s have been replaced with arithmetic.

That is
a) less readable than if-s
b) has a bug

[how]
Change the code back to if-s but put them into yet another function.
Hopefully we do not blow up CodeClimate's maximum number of functions
per file limit now...

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-20 12:09:50 +02:00
Fini Jastrow
83bd265b32 name-parser: Fix BigBlueTerminal 437 shortening
[why]
The shortened name is not as expected "BigBlueTerminal437 Nerd Font"
but some obscure "c7 Nerd Font".

[how]
The backreference marker `\1` is directly in front of the string `437`
which yields the replacement `\1437`. Python is not smart enough to
correctly handle that (but 'sed' for example is).

Instead use a named backreference which does not clash with the
following digits.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-19 18:47:24 +02:00
Fini Jastrow
0265034054 name-parser: Tweak mild name shortening
[why]
When we have a weight/width that can take a modifier, and a modifier is
present we always take the shortest form of the weight/width.

This is not how it is customarily done.

Experienced:
  ExtraCondensed ExtraBold -> ExtCd ExtBd
Expected:
  ExtraCondensed ExtraBold -> ExtCond ExtBd

[how]
In case a modifier is present:
Use the shortest form for weights.
Use the longer short form for widths.

[note]
Also circumvent CodeClimate issue by replacing if-s with formulas.
And adding one nonsense entry to the data tables, because they were
too 'similar' :rolleyes:

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-19 18:19:54 +02:00
Fini Jastrow
9be4835c29 font-patcher: Introduce less severe family name shortening
[why]
We want to keep "Nerd Font" in the font name if possible and instead
shorten the weight part with accepted abbreviations. But these abbrevs
are hard to read and sometimes a more mild abbreviating might be
sufficient to get the desired name length.

[how]
Introduce a new shortening method for the weight parts of a family name.
It takes a longer word (often un-shortened) when a weight stands on its
own, but when a modifier is used together with the weight the more
aggressive two-letter abbreviations are used.

That new shortening method becomes the default and all the functions get
a new parameter to enforce completely aggressive shortening, i.e. always
use the shortest possible form.

The new way to shorten is exposed all the way out to the font-patcher
user who can select the shortening method as parameter to the
--makegroups option. That option is undocumented because I expect some
changes later on, still.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-19 15:57:50 +02:00
Fini Jastrow
ff2be6af81 font-patcher: Fix "FontName Nerd Fonts" plural 's'
[why]
The patched font is named 'OriginalName Nerd Font' and not
'OriginalName Nerd Fonts'. This is a bug.

[how]
Take the correct singular string form when assembling the names.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-19 15:50:36 +02:00
Fini Jastrow
725df33434 name-parser: Allow generic renaming parts
[why]
Some name parts occur in several fonts but they take too much length
that we need to add 'Nerd Font' to the font name.

This can be handled as 'generic' SIL table parts, but the algorithm
stops searching for replacements one it has found one.

[how]
Always evaluate all rules of the SIL table.

Add entries for generics to the SIL table.
Add rule for BigBlueTerminal (437TT).
Also fix rule for MPlus that underwent a naming change with its update.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 21:14:00 +02:00
Fini Jastrow
909a54ab5a name-parser: Shorten 'Oblique' to 'Obl'
[why]
In a lot fonts when Oblique is moved to the base part of the name the
family gets too long. Since the base part is never shortened it will
stay there and make some fonts will end up with too ong bas families:

DejaVuSansMonoOblique
IosevkaTermOblique
OpenDyslexicOblique
ProggyCleanOblique

[how]
If the name is shortened, take the short form of oblique and add that to
the base name.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
22e7056a35 name-parser: Check font name lengths
[why]
The name parts of a font are rather restricted in length. Most
systems/applications do not have any problems with long strings, but
some will complain or ignore such fonts.

At the moment each font needs to be checked individually manually after
patching for length violations, which is hard.

[how]
Issue a message if one name in longer than endorsed.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
40f2f74e87 font-patcher: Use Python logging module
[why]
The outputs while patching are very ad-hoc and not grouped
systematically.
If run via gotta-patch-em the output is hard to process afterwards
automatically.

[how]
Use the logging module which outputs the messages and also writes a
run-log with all vital information.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
0558b14525 CI: Fix codeclimate issues
[why]
Cognitive burden of shorten_style_name() is 13 (allowed 9).

Duplicate code
        if self.use_short_families[1]:
            weights = FontnameTools.short_styles(weights)
            styles = FontnameTools.short_styles(styles)

[how]
I do not really buy the duplicate code issue (but circumvent it anyway).

shorten_style_name() was really hard to grasp, maybe use of a helper
function makes it more readable.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
f4515ac301 CI: Fix workflow after font file name change
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
807da1dcdf gotta-patch-em: Enable new naming for all fonts
[why]
The old naming is the reason for a lot problems. It creates a lot of
duplicate names and breaks bigger font families.

[how]
After introducing --makegroups we now enable it for all fonts.
Remove special cases from config.cfg files.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
e54b5046b6 font-patcher: Make name shortening optional
[why]
The option --makegroups shortens the name suffix and the styles
rigorously. That is needed for fonts with long names and/or long style
descriptions.
But some simple font would not need that. With the option we can adjust
the amount of shortening to fit the specific font (family).

Unfortunately we can not automatically detect that, because the
font-patcher script can not assume anything about a complete family as
every font file is patched individually.

[how]
Add optional numeric parameter to option '--makegroups'.
The values can be:
  0 - turned off, use old naming scheme
  1 - turned on, shortening                         'Bold' to 'Bd'
  2 - turned on, shortening 'Nerd Font' to 'NF'
  3 - turned on, shortening 'Nerd Font' to 'NF' and 'Bold' to 'Bd'
  4 - turned on, no shortening

If --makegroups is not specified this is the same as '--makegroups 0'.
If --makegroups is specified without number that means '--makegroups 3'.

[note]
The argparser module takes the last specified parameter as the one to
use: If you specify --makegroups multiple times only the last one will
be used.

This can be used for gotta-patch-em-all. Per default it (will) specify
--makegroups 3. But via config.cfg we can specify a font centric other
number for individual fonts. The config.cfg values are added later in
the command line, so they take precedence.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
b40995275e name-parser: Rename parameters
[why]
The variables' names are not really fitting (anymore).

[how]
No functional change.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
4394824977 name-parser: Change naming behavior
[why]
We created two fonts, one 'normal' and one 'Windows Compatible'. The
later one used shorter names because there are some Microsoft
applications that can not work with long (family-) names.

But it would be better to have universally usable fonts, like all our
sourcefonts. It would reduce confusion and also reduce the size of
installation packages.

[how]
ID 1 (Family) family()
  Unchanged
  Take the short form font name. Appends depending on mode short or long
  weight.

ID 2 (SubFamily) subfamily()
  Unchanged
  Transmogifies Oblique to Italic.
  Returns long form styles (i.e. RIBBI)

ID 4 (Fullname) CFF.Fullname fullname()
  Take the short form font name (instead of long).
  Depending on mode take short or long styles.
  This is now in line with ID 4 = ID 1 + ID 2

ID 6 (PS Fullname) CFF.FontName psname()
  We limited the length to 31 characters, which is sometimes too short
  to have different names for fonts of one same family.
  Now we take the short forms of name suffix and styles, for example
  VictorMonoNFM-BdIt

ID 16 (Typogr. Family) preferred_family()
  The name itself is unchanged (short form name plus verbose suffix),
  but the suppression check has been fixed to really compare the
  resulting name with the ID 1 name.

ID 17 (Typogr. Subfamily) preferred_styles()
  This is unchanged (long form styles) but the suppression check has been
  fixed to really compare the resulting string with ID 2.

CFF.Familyname ps_familyname()
  Uses ID 16 now and ID 1 as fallback. Was always ID 1 before, which is
  wrong.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:08 +02:00
Fini Jastrow
f99e108273 name-parser: Fix enable_short_families() with empty prefix
[why]
Specifying an empty string as prefix unexpectedly does not enable short
family names for all fonts - but for no font at all.
Usually an empty prefix matches all strings (font names).

This makes it hard to enable short families for all fonts no matter
what.

[how]
Fix detection if the prefix is False or a string.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:07 +02:00
Fini Jastrow
037ab03f16 name-parser: Drop special handling for 'Windows Compatible'
[why]
This just drops the 'windows compatibility' options in association with
the name parser (i.e. --makegroups') as we want to always create fonts
that work on any platform.

Note that the fonts prodused right now are NOT windows compat anymore
and you can not specify the flag. Violating 'git rules' this commit is
not working correctly. But it is easier to do this in smaller steps.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:07 +02:00
Fini Jastrow
619214c9ee name-parser: Make PS length limit more lenient
[why]
The postscript font name length limit of 31 is only present in very old
post script printers. And even then it depends on the printing method.

Some of our well knows source fonts have longer PS names (Noto etc).

And the limit exists regardless of windows or not.

[how]
Let limit depend on PS name part (font name or family name).
Remove reference to windows compat mode.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:07 +02:00
Fini Jastrow
ae656bad83 name-parser: Further formalize style handling
[why]
Some styles can not take modifiers. We handle the shortening as if they
can. That is not a problem but mighht be unexpected.

Do detect weights we have a fixed list, but that is missing a lot
weights that we would be able to shorten.

The shortening does not work for 'Retina', which is imho a more recent
'invention' (after the paper of the previous commit has been written).

[how]
Separate known weights and make them accessible from other functions.
Use these data tables also for weight detection.
Introduce 'Retina' in the weights table.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:07 +02:00
Fini Jastrow
81e2e1f988 name-parser: Generalize and shorten style-shortening
[why]
We really struggle to keep the font names below the length limits. To
achieve this some styles are abbreviated. The abbreviations have been
taken from Noto and were initially used to mimic Noto's naming scheme.

But a bit shorter names would help in some instances to produce short
enough name entries. Also some styles that are used by fonts other than
Noto are not abbreviated at all.

[how]
In document [1] Adobe gives examples of very short style abbreviations.
We just implement all these.

Example: 'ExtraCondensed' now becomes 'XCn' instead of the more readable
but longer 'ExtCond' that Noto uses.

[1] https://adobe-type-tools.github.io/font-tech-notes/pdfs/5088.FontNames.pdf

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-15 20:57:07 +02:00
Fini Jastrow
179dae01e0 font-patcher: Use standard filenames
[why]
The filenames of the patched fonts are rather ... unique:
- they contain blanks to separate name parts
- they do not separate name and style/weight

This is in part due to history reasons, because the names were not
parsed at all and just some suffix added.

Example (contrived):
  Victor Mono Nerd Font Propo Bold.ttf

Normally font file names would be:
  VictorMonoNerdFontPropo-Bold.ttf

We ourselves relied in part on that naming scheme, but do not follow it.
There are a lot powerline fonts out there that all add blanks to the
filename.

Some filename recommendation can be found in [1].

[how]
The filename is now always constructed directly from name ID 16
and name ID 17. If one of them is empty ID 1 and ID 2 are used as
fallback, as customary.
ID 16 (ID 1) and ID 17 (ID 2) are separated by a hyphen.

The result is that in can differ from the fontname (ID 6) and uses
always the longest most readable name parts.

[1] https://forum.fontlab.com/fontlab-studio-tips-and-tricks/font-family-naming-in-fontlab-studio-5/

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00
Fini Jastrow
68405398bc name-parser: Remove more names
[why]
There are some more name entries that we should rename or remove.
None of the fonts in the src/unpatched-fonts/ has these set; but in
principle a font could have it set and then we would need to handle
that.

[how]
Just remove the entries if they are existing.
Note that we do not handle NameID 25.

Also add some more comments.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00
Fini Jastrow
45f9551d73 font-patcher: Unify naming variants
[why]
The short form of 'Nerd Font Mono' is 'NFM'.

The PS names have a mixture 'NerdFontM'.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00
Fini Jastrow
784bd422d6 name-parser: Set UniqueID
[why]
When we rename a font we should always also change the unique ID.

[how]
Take the fullname and the Nerd Font version number. In general we do not
have the version number in the NameParser object; but we have the
'Version' name and we loot the last word (which we have set to the Nerd
Font version already in the patcher) as version descriptor.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00
Fini Jastrow
44ffebcaa3 name-parser: Add Extended to known styles
[why]
This is missing, for example for
  iosevka-extendedextralightoblique

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00
Fini Jastrow
95cae8fd81 Drop "Complete" from font names
[why]
Nowadays the Complete font is the normal font. We already dropped the
partially patched fonts long ago. If someone is self patching they will
know if it is a basic font or a complete font.

And already now one can not see if the patched font is bare minimum
(i.e. Seti, Custom, and Devi) or includes Powerline and/or
PowerlineExtra.

[how]
Just drop "Complete" from the naming.

[note]
As the name changes and thus the file name a lot of the other scripts
will break. But they might break anyhow because other naming changes, so
fix that as last commit.

See also commit
  557fc004c  Attempt to fix duplicate fonts in fontbook on osx

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 08:01:12 +02:00