GTK: Unexpected whitespace rendering in some fonts

24 views
Skip to first unread message

Robin Haberkorn

unread,
Apr 5, 2026, 5:47:00 PMApr 5
to scintilla...@googlegroups.com
Dear Scintilla hackers,

I noticed the following peculiarity in GTK 3 builds (reproducible in the HEAD
commit): When using the "Terminess Nerd Font" [1] with and without 1.5-width
icon glyphs, leading spaces get squashed unexpectedly when inserting the
overlarge Unicode glyph 0x2739 (✹ ). Attached is a screenshot demonstrating
the issue in Bait.

Any idea why this might be?

Best regards,
Robin

[1]: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Terminus.zip
screenshot-1775422945.png
signature.asc

Neil

unread,
Apr 6, 2026, 8:43:00 PMApr 6
to scintilla-interest
Robin:
 
I noticed the following peculiarity in GTK 3 builds (reproducible in the HEAD
commit): When using the "Terminess Nerd Font" [1] with and without 1.5-width
icon glyphs, leading spaces get squashed unexpectedly when inserting the
overlarge Unicode glyph 0x2739 (✹ ).

Scintilla uses platform APIs to perform detailed layout. Scintilla will normally present a whole run in one style to the platform to discover how the characters should be positioned and then to draw that run.

Platform APIs may 'shape' text runs in various ways such as choosing fonts and character variants. Nearby characters may influence this process.

When I look inside TerminessNerdFont-Regular.ttf with FontForge it appears that ✹ is not present so the font matching part of the platform may be choosing another particular font to ensure that it is displayed. Then the font chosen for ✹ is also used for the other characters in that run (the spaces) to ensure harmony.

Neil
Reply all
Reply to author
Forward
0 new messages