Ejemplo n.º 1
0
FontPlatformData::FontPlatformData(const FontDescription& fontDescription, const AtomicString& desiredFamily, bool useDefaultFontIfNotPresent)
{
    String family(desiredFamily);
    if (!equalIgnoringCase(family, defaultFontFamily()) && !FontFamilyChecker(family.charactersWithNullTermination().data()).isSupported()) {
        if (equalIgnoringCase(family, String(heiTiStr)) && isSongTiSupported())
            family = String(songTiStr);
        else if (useDefaultFontIfNotPresent)
            family = defaultFontFamily();
    }

    m_private = new FontPlatformPrivateData(fontDescription, family);
}
Ejemplo n.º 2
0
QString FontSettings::defaultFixedFontFamily()
{
    static QString rc;
    if (rc.isEmpty()) {
        QFont f = QFont(defaultFontFamily());
        f.setStyleHint(QFont::TypeWriter);
        rc = f.family();
    }
    return rc;
}