VirtualBox

Changeset 13535 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 23, 2008 1:35:11 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3217: "Font substitution fix not always works". This is 3rd try to fix that problem with some logging. Need to check on OpenSolaris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp

    r13531 r13535  
    246246         * font family if it is non scaleable-anti-aliased. */
    247247        QFontDatabase fontDataBase;
    248         QString subFamily (QFont::substitute (QApplication::font().family()));
    249         bool isScaleable = fontDataBase.isScalable (subFamily);
    250         if (!isScaleable)
    251             QFont::removeSubstitution (QApplication::font().family());
     248
     249        QString currentFamily (QApplication::font().family());
     250        bool isCurrentScaleable = fontDataBase.isScalable (currentFamily);
     251        LogFlowFunc (("Font: Current family is '%s'. It is %s.\n",
     252            currentFamily.toLatin1().constData(),
     253            isCurrentScaleable ? "scalable" : "not scalable"));
     254
     255        QStringList subFamilies (QFont::substitutes (currentFamily));
     256        foreach (QString sub, subFamilies)
     257        {
     258            bool isSubScalable = fontDataBase.isScalable (sub);
     259            LogFlowFunc (("Font: Substitute family is '%s'. It is %s.\n",
     260                sub.toLatin1().constData(),
     261                isSubScalable ? "scalable" : "not scalable"));
     262        }
     263
     264        QString subFamily (QFont::substitute (currentFamily));
     265        bool isSubScaleable = fontDataBase.isScalable (subFamily);
     266        if (isCurrentScaleable && !isSubScaleable)
     267            QFont::removeSubstitution (currentFamily);
    252268#endif
    253269
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette