Fix Noto too wide

[why]
The 'monospace' width is determined by examining all the 'normal' glyphs
and taking the widest one.

'Normal' means 0x00-0x17f: the Latin Extended-A range.

Unfortunately Noto has the '1/2', '1/4', '3/4' that are all wider then the
normal (i.e. letter) glyphs.

[how]
Exclude a small sub-range from the 'find the widest glyph' that contain
no glyphs one would call 'letter'.

Fixes: #610

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-05-14 19:36:58 +02:00 committed by Fini
parent afd7ba1017
commit fbe07b8abb

View file

@ -659,6 +659,8 @@ class font_patcher:
#
# 0x00-0x17f is the Latin Extended-A range
for glyph in range(0x00, 0x17f):
if glyph in range(0x7F, 0xBF):
continue # ignore special characters like '1/4' etc
try:
(_, _, xmax, _) = self.sourceFont[glyph].boundingBox()
except TypeError: