zigalenarcic / mangl

An enhanced man page viewer for linux and BSD systems based on OpenGL and mandoc libraries
Other
39 stars 7 forks source link

Search highlighting misaligned when font file doesn't exist. #18

Open deathtrip opened 2 months ago

deathtrip commented 2 months ago

When you specify a font file that doesn't exist in manglrc, mangl doesn't fallback to the default font, as is the case when there's no config file. Instead the font seems correct, but when searching for a string, the highlight is misaligned.

zigalenarcic commented 2 months ago

Hi It happens because the selected font is not monospaced. Highlights etc. are calculated as if the font is monospace (you're supposed to use man pages only with monospace fonts because there are ascii tables and other things requiring alignment). I'm not aware what a good solution would be as fc-match returns some answer even for nonexisting font names.