Apache OpenOffice (AOO) Bugzilla – Issue 128583
Crash at startup in fontconfig functions when certain fonts are installed
Last modified: 2024-01-14 16:53:28 UTC
Bug reported on dev@ mailing list: https://lists.apache.org/thread/3ogm6vzmbz9ntmm1cjgzpws0jzsrxmk6 When a certain font "Sitka.ttc" is present, AOO crashes at startup.
The crash is in function FcFontMatch(), called by method FontCfgWrapper::addFontSet(FcSetName) in file main/vcl/unx/generic/fontmanager/fontconfig.cxx According to the Fontconfig documentation [1], we should invoke FcDefaultSubstitute() first, and apparently we do not. Adding that invocation seems to fix the problem in my own test case. 1: https://www.freedesktop.org/software/fontconfig/fontconfig-devel/fcfontmatch.html
Fixed with commit 9e383899f55d91dcbf240aac96faa852c30bbdbd to trunk. Cherry-picked into AOO41X with commit 96cc864ad79ef0ed2b9769f074673a55e4056b44. Cherry-picked into AOO42X with commit a0ea24c5c107bd6c1ce8cd77d6a0f2c7066cdec8.