Geany invisible underscore

geany

Recently, Geany suddenly started showing underscores as spaces – i.e. they've become "invisible".

For example this text – is_empty, displays the same as is empty. But when copying to the clipboard from Geany, the underscores are as they should. They're only displayed wrong.

Best Answer

Same issue, Ubuntu 20.04

The problem is well described here:
https://github.com/geany/geany/issues/1387#issuecomment-287537022

Some fonts write underscores below descenders but don't include that in the declared font height, this is technically incorrect and confuses the layout software in Scintilla (the editing widget Geany uses) so insufficient height is allowed for underscores.

The solution is to either change font or to instruct Geany to make line height bigger:

Tools > Configuration Files > filetypes.common

[styling]
line_height=0;2;
Related Question