VirtualBox

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


Ignore:
Timestamp:
Oct 22, 2008 3:46:18 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3217: "Font substitution fix not always works". This is try to fix that problem, need to be checked for OpenSolaris.

File:
1 edited

Legend:

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

    r13492 r13500  
    3232#endif
    3333
     34#ifdef Q_WS_X11
     35#include <QFontDatabase>
     36#endif
     37
    3438#include <QCleanlooksStyle>
    3539#include <QPlastiqueStyle>
     
    266270#ifdef Q_WS_X11
    267271    /* Cause Qt4 has the conflict with fontconfig application as a result
    268      * substituting some fonts with non anti-aliased bitmap font we are
    269      * reseting all the substitutes here for the current application font. */
    270 # ifndef Q_OS_SOLARIS
    271     QFont::removeSubstitution (QApplication::font().family());
    272 # endif /* Q_OS_SOLARIS */
     272     * sometimes substituting some fonts with non scaleable-anti-aliased
     273     * bitmap font we are reseting substitutes for the current application
     274     * font family if it is non scaleable-anti-aliased. */
     275    QFontDatabase fontDataBase;
     276    QString subFamily (QFont::substitute (QApplication::font().family()));
     277    bool isScaleable = fontDataBase.isSmoothlyScalable (subFamily);
     278    if (!isScaleable)
     279        QFont::removeSubstitution (QApplication::font().family());
    273280#endif
    274281
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