On Tue, 2023-11-14 at 16:40 +0100, Frank Steiner wrote: > Anyway, for me all fonts are totally fine with medium hinting, so I'd > be way happier with it because I could use microsoft fonts in the > thinner version. > > People who explicitely set a font hinting style usually know what > they are doing and why the want it. But to prevent font issues by > chance because of font settings someone is not aware of, one could > add a SAL_ALLOW_SYSTEM_FONTHINTING variable that must be set to true > to keep the hintstyle that is found in > "cairo_font_options_get_hint_style(pFontOptions)" > instead of downgrading it to slight. > > I wouldn't mind trying to write a patch for such a variable if there > is a chance it could be accepted...? I won't put any road blocks in the way if you want to contribute something like that. I don't think it will give universally good results but if you find it works for you and want to use an env variable, then this is on a very hot code path so use a static like the static bool noFontLookup = getenv("SAL_NO_FONT_LOOKUP") != nullptr; example so there isn't a getenv on ever text render. Maybe SAL_ALLOW_DEFAULT_HINTING is a naming option, along the lines of the naming used in QFont::HintingPreference of https://doc.qt.io/qt-6/qfont.html which has a decent summary on the same topic in its option descriptions