Comment 12 for bug 209256

Revision history for this message
Igor (i-gocalinski) wrote :

In Cairo there is following logic for setting the HintStyle implemented:
  if the system-wide setting (I really don't know if it is XSETTINGS Xft/HintStyle served by gnome-settings-daemon or xrdb xft.hintstyle value) contains any valid value (int = 0-3, which represent HintNone, HintSlight, HintMedium and HintFull ), this value overrides everything and will be always used by Cairo.
  if the system-wide setting doesn't exist, the HintFull is assumed and that value will be used.
  if the system-wide setting exists, but is not valid, the HintStyle returned by FontConfig will be used.

I have modified the code (options represent the system-wide options object, others represents settings returned by FontConfig):
  if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
    options->base.hint_style = others->base.hint_style
into
  if (others->base.hint_style != CAIRO_HINT_STYLE_DEFAULT)
    options->base.hint_style = others->base.hint_style

This way, if FontConfig has any information about Hinting of the font that was requested, that information will be used. Otherwise Cairo uses the default system-wide setting.