Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
font-patcher: Fix more 'Nerd Font 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 some fonts that claim to be monospaced still have some glyphs that are wider than the others. [how] Exclude a small group of glyphs from the 'find the widest glyph'. The list is specifically targetted at the fonts we patch, see PR ryanoasis#1045. Most of these glyphs are either visually small and it is unclear why they are too wide (like double-quotes), or they are from the real extended set, notably all the Eth (D with a slash) and other added-slash or added-caron glyphs. In ignoring them we might 'break' these specific glyphs for the people who use them (like: they extend out of the cell into the next), but that is the only way to keep the 'monospaced promise' without redesigning the actual font. But without these exceptions we have Nerd Font Mono fonts that increase the cell width so that 'normal text' is rendered almost unreadable. So this is an improvement for most users; and I see no way so solve these font issues for all users (without redesigning the font itself ;). Also add a 'warning' if a (still) problematic font is to be patched. As reminder for self-patcher or when we add fonts here. [note] Related commit fbe07b8 Fix Noto too wide 2945cec Fix Overpass Mono too wide Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
- Loading branch information