Re: GTK: Unexpected whitespace rendering in some fonts
Neil <[email protected]> Mon, 6 Apr 2026 17:43:00 -0700 (PDT)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_563468_1875265113.1775522580473 Content-Type: multipart/alternative; boundary="----=_Part_563469_1005544341.1775522580473" ------=_Part_563469_1005544341.1775522580473 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Robin: =20 I noticed the following peculiarity in GTK 3 builds (reproducible in the=20 HEAD=20 commit): When using the "Terminess Nerd Font" [1] with and without=20 1.5-width=20 icon glyphs, leading spaces get squashed unexpectedly when inserting the=20 overlarge Unicode glyph 0x2739 (=E2=9C=B9 ). Scintilla uses platform APIs to perform detailed layout. Scintilla will=20 normally present a whole run in one style to the platform to discover how= =20 the characters should be positioned and then to draw that run. Platform APIs may 'shape' text runs in various ways such as choosing fonts= =20 and character variants. Nearby characters may influence this process. When I look inside TerminessNerdFont-Regular.ttf with FontForge it appears= =20 that =E2=9C=B9 is not present so the font matching part of the platform may= be=20 choosing another particular font to ensure that it is displayed. Then the= =20 font chosen for =E2=9C=B9 is also used for the other characters in that run= (the=20 spaces) to ensure harmony. Neil --=20 You received this message because you are subscribed to the Google Groups "= scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-i= nterest/543078e2-429b-4bef-8bfd-5bbcdf2616e1n%40googlegroups.com. ------=_Part_563469_1005544341.1775522580473 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div><div dir=3D"auto">Robin:</div><div>=C2=A0</div><blockquote style=3D"ma= rgin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding= -left: 1ex;">I noticed the following peculiarity in GTK 3 builds (reproduci= ble in the HEAD <br />commit): When using the "Terminess Nerd Font" [1] with and without 1.= 5-width <br />icon glyphs, leading spaces get squashed unexpectedly when inserting = the <br />overlarge Unicode glyph 0x2739 (=E2=9C=B9 ).</blockquote><div><br /><= /div><div>Scintilla uses platform APIs to perform detailed layout. Scintill= a will normally present a whole run in one style to the platform to discove= r how the characters should be positioned and then to draw that run.</div><= div><br /></div><div>Platform APIs may 'shape' text runs in various ways su= ch as choosing fonts and character variants. Nearby characters may influenc= e this process.</div><div><br /></div><div>When I look inside=C2=A0Termines= sNerdFont-Regular.ttf with FontForge it appears that =E2=9C=B9 is not prese= nt so the font matching part of the platform may be choosing another partic= ular font to ensure that it is displayed. Then the font chosen for =E2=9C= =B9 is also used for the other characters in that run (the spaces) to ensur= e harmony.</div><div><br /></div><div>Neil</div></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;scintilla-interest" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= scintilla-interest/543078e2-429b-4bef-8bfd-5bbcdf2616e1n%40googlegroups.com= ?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/= scintilla-interest/543078e2-429b-4bef-8bfd-5bbcdf2616e1n%40googlegroups.com= </a>.<br /> ------=_Part_563469_1005544341.1775522580473-- ------=_Part_563468_1875265113.1775522580473--