Skip to content

Set default LCD filter to FreeType's default

Nikolaus Waxweiler requested to merge madig/cairo:ft-default-lcd-filter into master

This MR has been motivated by https://bugzilla.redhat.com/show_bug.cgi?id=1645763. It turns out that without fontconfig telling cairo differently, cairo will chose the legacy LCD filter which seemingly does no filtering at all. This MR changes the default to FreeType's default.

Running the test suite locally gives me some (expected?) rendering difference in some glyph tests. Not sure what to do about them? There is no API to select the legacy filter for them to avoid changes? Also note that there's two ways FreeType can do subpixel rendering:

  1. The traditional one behind the FT_CONFIG_OPTION_SUBPIXEL_RENDERING define that comes with the ability to set LCD filters.
  2. A new one called "Harmony" that gets used if the define above is undefined and gives the same result as the light LCD filter ± rounding errors. You can't set filters here but can specify the subpixel geometry (e.g. something for pentile displays).
Edited by Nikolaus Waxweiler

Merge request reports