[Interest] known issues with QFontDatabase::addApplicationFontFromData in Qt/Mac 5.9?

René J.V. Bertin rjvbertin at gmail.com
Wed May 29 10:25:11 CEST 2019


On Tuesday May 28 2019 15:27:54 Jim Prouty wrote:

Thanks,

>Or, if you want to load them from your bundle, put them in (for example) Your.app/Contents/Resources/Fonts, the value is only the bit after Contents/Resources, namely "Fonts".

I wasn't aware of this Info dict key but I also tweaked the application so it loads the TTF and OTF files from the bundle resource, using QFD::addApplicationFont() (which is safe). Your solution is probably more elegant; I'd have to check if it also works when using the Freetype font engine.

My point here wasn't so much to get suggestions how to work around the issue but to know if I'm the only one to have noticed it. FWIW, I'm suspecting it may be one of the CoreText API calls, from the 10.10 SDK that I'm using.

R.

>
>> On May 24, 2019, at 1:35 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
>> 
>> Hi,
>> 
>> Is there a known issue when using QFDb::addApplicationFontFromData() or QFDb::addApplicationFont() with an embedded resource path in Qt 5.9 on Mac? I'm getting a crash; as far as I can tell the CTFontRef creation from the font data succeeds but the CoreText call to fetch the font description crashes, comparable to what happens here except that I can reproduce it by loading font data through the UI):
>> 
>> https://github.com/mooltipass/moolticute/issues/157




More information about the Interest mailing list