Open gnachman opened 5 years ago
Thanks for sharing this issue. It seems too technical for me. I hope to discover the solution soon
I see this too. Enabling anti-aliasing fixes it. I didn't see any difference when toggling font smoothing, however. This is my configuration:
I just try PragmataPro in iTerm in Mac OS Catalina turning off antialiasing and ligatures works properly. Aliasing text in Mac sucks but ligatures works.
That's right, they work perfectly if antialiasing is enabled.
The author's issue is that they do not work when anti-aliasing is disabled. I did not find that sub pixel anti-aliasing made any difference, nor did Mac fonts smoothing.
I received an issue report that iTerm2 does not render PragmataPro correctly under some circumstances:
https://gitlab.com/gnachman/iterm2/issues/7394
After investigation, I've discovered that it behaves differently than other fonts when anti-aliasing is disabled. The symptom is that text is stretched horizontally:
This can be mitigated by enabling font smoothing (which, oddly, is separate from antialiasing—I don't know exactly what it means and Apple's docs are vague). However, if subpixel antialiasing is turned on even that does not mitigate the problem. On macOS 10.14, subpixel antialiasing can be enabled with
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
.I believe this is a PragmataPro bug because I was not able to reproduce it with any other of the 39 other fonts on my system.
I wrote a simple app that draws "Hello World" with PragmataPro using CoreText and it reproduced it, so it's not something weird that iTerm2 is doing. Here's a gist with the drawing code that reproduces the issue: https://gist.github.com/gnachman/df118759c540cc4c507a43e7cf391ff1