mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-12 09:41:47 +02:00
font-patcher: Fix Monofur 'Nerd Font Mono' too wide
[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>
This commit is contained in:
parent
326ccdf601
commit
dd3ed4dc74
1 changed files with 3 additions and 2 deletions
|
@ -986,6 +986,7 @@ class font_patcher:
|
|||
0x132, 0x133, # IJ, ij (in Overpass Mono)
|
||||
0x022, 0x027, 0x060, # Single and double quotes in Inconsolata LGC
|
||||
0x0D0, 0x10F, 0x110, 0x111, 0x127, 0x13E, 0x140, 0x165, # Eth and others with stroke or caron in RobotoMono
|
||||
0x02D, # hyphen for Monofur
|
||||
]:
|
||||
continue # ignore special characters like '1/4' etc and some specifics
|
||||
try:
|
||||
|
@ -999,10 +1000,10 @@ class font_patcher:
|
|||
print("Warning: Extended glyphs wider than basic glyphs, results might be useless\n {}".format(
|
||||
report_advance_widths(self.sourceFont)))
|
||||
warned = True
|
||||
# print("New MAXWIDTH-A {} {} -> {} {}".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax))
|
||||
# print("New MAXWIDTH-A {:X} {} -> {} {}".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax))
|
||||
if xmax > self.font_dim['xmax']:
|
||||
self.font_dim['xmax'] = xmax
|
||||
# print("New MAXWIDTH-B {} {} -> {} {}".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax))
|
||||
# print("New MAXWIDTH-B {:X} {} -> {} {}".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax))
|
||||
# print("FINAL", self.font_dim)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue