Garbled text with ligature font
kika opened this issue · 7 comments
I have a font I can't live without (some form of psychotic disability I guess) - Fixedsys
MacVim is the only editor I use and once I noticed that it supports ligatures I started working on the font (I didn't do the whole font, only added programming ligatures). Everything was nice and easy until snapshot-147
which broke these ligatures. Now a>=b
looks like instead of
(the vertical alignment is fine, it's just my screenshotting abilities).
The change that ruined it is this: ee668a4 by @ichizok
I tried to debug this for a couple of days, but my understanding of CoreText is close to zero and I'm mostly wandering around printing different things. There's of course a possibility that there's something wrong with the font itself, but it works everywhere else (except for Konsole in Arch Linux, which is a known issue and in Windows Powershell), at least on MacOS. It works in TextEdit, which I suppose is a "reference implementation" of CoreText based editor.
I'm willing to invest some more time with proper guidance from someone who knows how all of this works. For now, the workaround is just take MMCoreTextView.m
from snapshot-146
and slap it into the snapshot-153
source tree and rebuild. Works for me, but this is stupid.
Relevant issue from the font repository: kika/fixedsys#16
Hmm I’ll need to take a look. Coincidentally I was wondering whether people use the ligature feature. Now I know.
I can confirm this issue with another font (PragmataPro). Check this screen recording.
@zrzka It could be related but it's a different problem. And I believe MacVim was always like that when the cursor is on the line with ligature the ligature breaks up into components and then assembles back again. But the space taken by the ligature remains the same. In this particular issue the ligature takes half of the horizontal space and thus the next letter overlaps with the ligature.
@eirnym Fira Code is not monospaced. Fixedsys emulates monospacingness (:-)) by clever geometry in the font metrics, and it works everywhere, except MacVim, Windows Powershell and Linux konsole
.