Trying to render a font with simple grayscale anti-aliasing, like:
cairo_font_options_t* fopts = cairo_font_options_create();
fails to work. The options are ignored and instead the resulting rendering will produce results identical with CAIRO_ANTIALIAS_SUBPIXEL with colored pixel around the edge instead of grayscale ones.
A simple example program reproducing the problem is attached.
(In reply to comment #0)
> A simple example program reproducing the problem is attached.
Are you sure about that? Where?
Created attachment 50660 [details]
Demo of the problem
Yes, reasonable sure about that. The problem originally showed up in Gnome:
But seems to have its cause in Cairo.
Most probably you have fontconfig config files that override the hinting unconditionally. That's what's shipped with fontconfig but disabled by default. It's a bug to ship those (as opposed to config that only sets antialiasiing if not explicitly set), and cairo can force it if user asked, but that wouldn't work nice with fontconfig.
Created attachment 50661 [details] [review]
Patch for grayscale anti-aliasing issue
Attached is a patch for the issue.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/135.