font-patcher: Special rule for SymbolsOnly font

[why]
When patching the SymbolsOnly font via gotta-patch-em-all we create a
'Nerd Font Propo'. With the previous change that will be reflected by a
changed name.

The name change can come unexpected for users.

And in fact a 'Nerd Font' version would be ridiculous as there are no
preexsiting glyphs in the font.

So we should keep the previous naming:
* `Symbols Only Nerd Font` (which is in fact a Nerd Font Propo)
* `Symbols Only Nerd Font Mono` (for the monospaced version)

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-01-15 16:34:02 +01:00
parent 0b6f63e4df
commit a7ecf075d2

View file

@ -311,6 +311,7 @@ class font_patcher:
self.font_dim = None # class 'dict'
self.font_extrawide = False
self.source_monospaced = None # Later True or False
self.symbolsonly = False
self.onlybitmaps = 0
self.essential = set()
self.config = configparser.ConfigParser(empty_lines_in_values=False, allow_no_value=True)
@ -529,7 +530,7 @@ class font_patcher:
if self.args.single:
additionalFontNameSuffix = " M" + additionalFontNameSuffix
verboseAdditionalFontNameSuffix = " Mono" + verboseAdditionalFontNameSuffix
elif self.args.nonmono:
elif self.args.nonmono and not self.symbolsonly:
additionalFontNameSuffix = " P" + additionalFontNameSuffix
verboseAdditionalFontNameSuffix = " Propo" + verboseAdditionalFontNameSuffix
@ -717,7 +718,7 @@ class font_patcher:
fam_suffix += 'M'
else:
fam_suffix += ' Mono'
elif self.args.nonmono:
elif self.args.nonmono and not self.symbolsonly:
if self.args.windows:
fam_suffix += 'P'
else:
@ -1141,6 +1142,7 @@ class font_patcher:
if self.font_dim['height'] == 0:
# This can only happen if the input font is empty
# Assume we are using our prepared templates
self.symbolsonly = True
self.font_dim = {
'xmin' : 0,
'ymin' : -self.sourceFont.descent,