Changeset 238 for trunk/src


Ignore:
Timestamp:
Oct 16, 2009, 10:46:02 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Temporarily substitute the "WarpSans" font with "Workplace Sans" until we support OS/2 bitmap fonts (to get more native look and feel if "Workplace Sans" is installed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/text/qfontdatabase_pm.cpp

    r234 r238  
    296296                        cached.styleKey.weight = QFont::Black;
    297297
     298                    // @todo "Workplace Sans" from Alex Taylor has weight class
     299                    // < 400 whic makes it Light. It has some bad side effects
     300                    // in Qt, in particular, requesting Normal will select Bold
     301                    // instead of Light if "Workplace Sans Bold" is also installed.
     302                    // For this reason, we override the weight here. Remove the
     303                    // hack if the font is changed to Normal.
     304                    if (cached.familyName == QLatin1String("Workplace Sans")) {
     305                        if (cached.styleKey.weight == QFont::Light)
     306                            cached.styleKey.weight = QFont::Normal;
     307                    }
     308
    298309                    switch (os2_table->usWidthClass) {
    299310                        case 1: cached.styleKey.stretch = QFont::UltraCondensed; break;
     
    401412                //
    402413                // @todo find a proper way to detect actual supported scripts to make
    403                 // sure these fonts are not matched for scripts they don't support
     414                // sure these fonts are not matched for scripts they don't support.
     415                //
     416                // @todo remove the hack for "Workplace Sans" once it is corrected
    404417                for (int ws = 0; ws < QFontDatabase::WritingSystemsCount; ++ws)
    405418                    family->writingSystems[ws] = QtFontFamily::Supported;
     
    642655        req.stretch = 100;
    643656
     657    // @todo a hack to substitute "WarpSans" with "Workplace Sans". Remove this
     658    // when we start supporting OS/2 bitmap fonts.
     659    if (req.family == QLatin1String("WarpSans"))
     660        req.family = QLatin1String("Workplace Sans");
     661
    644662    QFontCache::Key key(req, d->rawMode ? QUnicodeTables::Common : script, d->screen);
    645663    if (!d->engineData)
Note: See TracChangeset for help on using the changeset viewer.