Sublime Forum

Ligature glyphs cut off horizontally

#1

Under certain conditions, not enough space is allocated to the rendering of (wide) glyphs in the chosen font. See what happens to the four hashtags in the H4 line while stepping through pixel sizes:

monolisa-in-sublimetext

The fourth hashtag in the quadruple-hashtag ligature gets cut off occasionally. The cut-off only appears on ligatures which comprise 4 or more characters, and only in some sizes. Screengrab: SublimeText build 3211 on macOS 10.14.6.

The font in question is MonoLisa, I am involved in its development and can supply a sample version to the SublimeText devs if necessary.

The key design difference between Fira Code and MonoLisa is that FC does backward replacement for its ligatures: <SPACE><SPACE><SPACE><LIG> where <LIG> has a negative left sidebearing and overlaps over the preceding spaces. And ML does forward replacement: <LIG><SPACE><SPACE><SPACE> where <LIG> has a negative right sidebearing and overlaps the subsequent spaces. Perhaps that is a clue.

The issue is being discussed in the MonoLisa GitHub repo:

(Update: we have received screenshots from Linux users where already a 3-character ligature shows cut-offs, see the GitHub issue linked above.)

1 Like

#2

I’d like to investigate this issue, but unfortunately MonoLisa is not freely available. Is there another font that has the same issue that I could use to diagnose this?

0 Likes

#3

I can send such a font to you, but the forum does not let me send DMs (yet). Can you promote my trust level or DM me your e-mail address?

0 Likes

#4

Hi! I received a bug report on the Cascadia Code github page related to this issue:

The latest version of Cascadia Code (available here: https://github.com/microsoft/cascadia-code/releases/tag/v2102.03) is showing this issue with ligatures longer than 2 glyphs, as I switched from a Fira Code-like backwards facing implementation to a forwards facing ligature implementation, apparently similar to Mona Lisa. It appears that this is not a problem with the last stable version of Sublime Text as my installs don’t demonstrate it.

Please let me know if I can be of assistance in resolving this issue.

0 Likes