fabrizioschiavi / pragmatapro

PragmataPro font is designed to help pros to work better
https://www.fsd.it/shop/fonts/pragmatapro/
1.42k stars 40 forks source link

Rendering issues on macOS 10.14 when non-antialiased #129

Open gnachman opened 5 years ago

gnachman commented 5 years ago

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:

screen shot 2018-12-08 at 10 39 46 am

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

fabrizioschiavi commented 5 years ago

Thanks for sharing this issue. It seems too technical for me. I hope to discover the solution soon

jspiro commented 4 years ago

I see this too. Enabling anti-aliasing fixes it. I didn't see any difference when toggling font smoothing, however. This is my configuration:

Screenshot 2020-04-13 at 11 14 25 PM
fabrizioschiavi commented 4 years ago

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.

Screenshot 2020-04-14 at 10 14 25

jspiro commented 4 years ago

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.