Skip to content

src: do not override explicitly requested grayscale antialiasing.

This is a bug which was reported to use for years. Some distributions on Linux set subpixel antialiasing which changes the rendering of work files. This is wrong (it's not GUI rendering, one don't want it to follow system preferences but creator choices).

Someone reported recently with a patch on GIMP side proposing to use CAIRO_ANTIALIAS_GRAY which should be just the right fix, except that this person realized it doesn't work if the system settings override this value with subpixel. So we'd like to have this fixed in Cairo now. 🙂

Last report we have about this: https://gitlab.gnome.org/GNOME/gimp/-/issues/6210

Thanks!


If CAIRO_ANTIALIAS_DEFAULT is selected and system is set to subpixel, it is perfectly normal to switch to CAIRO_ANTIALIAS_SUBPIXEL. But when the calling application specifically requested CAIRO_ANTIALIAS_GRAY then Cairo should honor the request.

This is an issue we have had for years in GIMP, where text on images would render differently depending on the system the file is opened on. This is obviously not right as a graphics work should be system independant and allow the creator to decide if one wants a text to have grayscale or subpixel rendering (a settings which would stick when sharing the work file). Cairo should not override this. The CAIRO_ANTIALIAS_DEFAULT settings exists exactly for this (when we want Cairo to choose for us, in a system-dependant way); other settings are when we need system independance.

Merge request reports