Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always disable font smoothing when creating a CoreGraphicsContext #470

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lord
Copy link
Contributor

@lord lord commented Oct 31, 2021

This makes all text rendered match the rendering used by Sketch. There's also this blog post by Tonsky that discusses it.

To me this seems reasonable to just disable for all apps. But could also make changing this a custom option that people can opt-in to? (Although I'd maybe still argue for defaulting to false)

Here are some @2x screenshots taken in Pages (which uses font smoothing if it's turned on system-wide) and Sketch (which always turns it off). The font is Mallory MicroPlus Bold
Artboard

I notice the effect a lot more when it's white text on a dark background. Not sure if that's actually a rendering difference or just an optical illusion

@lord
Copy link
Contributor Author

lord commented Oct 31, 2021

This may explain some of #383, but I'm not certain

@cmyr
Copy link
Member

cmyr commented Nov 12, 2021

It looks like this option has finally been removed in monterey? In the back of my head the only possible concern I'd have, here, is whether this makes for a worse experience for folks on non-retina external monitors, but maybe this doesn't concern us.

Did you run into this as a problem, somewhere?

@lord
Copy link
Contributor Author

lord commented Dec 24, 2021

Non-retina external monitors are a good point! Not sure how this would affect those. I'd be happy to amend this PR to make this an optional function call instead?

I guess I ran into this since I noticed the rendering seemed wrong on one of my projects, and I couldn't figure out a way to call this function without making modifications to Piet. Would be happy to be wrong!

@cmyr
Copy link
Member

cmyr commented Jan 6, 2022

@lord yea, I think it's fine to have platform-specific helpers. I'm not sure where exactly I would hang this method. If you're using CoreGraphicsContext directly it could go there, otherwise we might need an extension trait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants