From 8845e3fb9983bf92262cf3fa1bfd8bc53a433ad6 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Tue, 10 Jan 2023 19:29:23 +0100 Subject: [PATCH] font-patcher: Fix Overpass Mono 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 Overpass (Mono) has wide-as-two-letters IJ and ij ligatures. [how] Exclude a small sub-range from the 'find the widest glyph' that contain these ligatures. Yes they will kind of break, but what can we do if we want to create a strictly monospaced font? [note] Related commit fbe07b8ab Fix Noto too wide Related: #1043 Signed-off-by: Fini Jastrow --- font-patcher | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/font-patcher b/font-patcher index 326b4d5b2..da0806713 100755 --- a/font-patcher +++ b/font-patcher @@ -945,8 +945,8 @@ class font_patcher: # # 0x00-0x17f is the Latin Extended-A range for glyph in range(0x21, 0x17f): - if glyph in range(0x7F, 0xBF): - continue # ignore special characters like '1/4' etc + if glyph in range(0x7F, 0xBF) or glyph in range(0x132, 0x134): + continue # ignore special characters like '1/4' etc and 'IJ' 'ij' try: (_, _, xmax, _) = self.sourceFont[glyph].boundingBox() except TypeError: