Switch default Pango/Cairo render backend to Fontconfig on macOS

Fixes #8488.

This is a simple setenv trick. Ideally we would instead figure out how
to fix Oldania ADF Std to work on newer macOS, but since we know the
Fontconfig backend works for us on Windows and Linux, we may as well
stick to it and hope there will never be a situation where CoreText
would prove superior somehow.
This commit is contained in:
Iris Morelle 2024-11-20 11:33:39 -03:00 committed by Subhraman Sarkar
parent bb4eb0bf1b
commit ce6c56adea
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,2 @@
### User interface
* Switched default Pango/Cairo backend from CoreText to Fontconfig on macOS to fix issues with certain fonts such as Oldania ADF Std being unrecognized on current OS versions (issue #8488).

View file

@ -920,6 +920,11 @@ int main(int argc, char** argv)
_putenv("PANGOCAIRO_BACKEND=fontconfig");
_putenv("FONTCONFIG_PATH=fonts");
#endif
#ifdef __APPLE__
// Using setenv with overwrite disabled so we can override this in the
// original process environment for research/testing purposes.
setenv("PANGOCAIRO_BACKEND", "fontconfig", 0);
#endif
try {
commandline_options cmdline_opts = commandline_options(args);