Skip to content

text: prevent use of rgba subpixel anti-aliasing #4575

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

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

lovell
Copy link
Member

@lovell lovell commented Jun 17, 2025

It looks like newer versions of pango enable subpixel anti-aliasing by default, which can lead to rather colourful but unwanted artefacts around the edge of rendered text.

This previously came up in #4338 but was considered at the time to be a pango bug. A new issue came up in sharp at lovell/sharp#4417 so I took a quick look and found cairo_font_options_set_antialias to enforce the previous default anti-aliasing approach.

Before:

After:

@lovell lovell force-pushed the text-prevent-subpixel-rendering branch from ebe67f0 to e21b6ea Compare June 17, 2025 16:59
@jcupitt
Copy link
Member

jcupitt commented Jun 17, 2025

Nice!

@jcupitt jcupitt merged commit 1a77049 into libvips:master Jun 18, 2025
6 checks passed
@lovell lovell deleted the text-prevent-subpixel-rendering branch June 18, 2025 09:24
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