diff --git a/font-patcher b/font-patcher index 326b4d5b2a..5e7b8e3ceb 100755 --- a/font-patcher +++ b/font-patcher @@ -944,19 +944,29 @@ class font_patcher: # Ignore the y-values, os2_winXXXXX values set above are used for line height # # 0x00-0x17f is the Latin Extended-A range + warned = self.args.quiet or self.args.nonmono # Do not warn if quiet or proportional target 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 [ + 0x132, 0x134, # 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 + ]: + continue # ignore special characters like '1/4' etc and some specifics try: (_, _, xmax, _) = self.sourceFont[glyph].boundingBox() except TypeError: continue + # print("WIDTH {:X} {} ({} {})".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax)) if self.font_dim['width'] < self.sourceFont[glyph].width: self.font_dim['width'] = self.sourceFont[glyph].width - # print("New MAXWIDTH-A {} {} {}".format(glyph, self.sourceFont[glyph].width, xmax)) + if not warned and glyph > 0x7a: # NOT 'basic' glyph, which includes a-zA-Z + print("Extended glyphs wider than basic glyphs") + warned = True + # print("New MAXWIDTH-A {} {} -> {} {}".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, xmax)) + # print("New MAXWIDTH-B {} {} -> {} {}".format(glyph, self.sourceFont[glyph].width, self.font_dim['width'], xmax)) + # print("FINAL", self.font_dim) def get_scale_factor(self, sym_dim):