[Qt-interest] Some fonts don't work on Mac OS X

James Larcombe james.larcombe at avid.com
Thu Sep 9 18:21:43 CEST 2010


Try this:

In the QCoreTextFontEngineMulti constructor (qfontengine_mac.mm),
replace

    QCFString name;
    ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);

with

    QCFString name = fontDef.family;

This avoids using the duff ATSFontRef passed in and fixes the problem
for me. The QFontDef's family name is set in QFontDatabase::load using
the ATSFontFamilyRef, which seems to be valid.

Of course, this does nothing for the Carbon build, so if you care about
that you'll need to dig further.

Hope this helps
James




More information about the Qt-interest-old mailing list