Ignore:
Timestamp:
Oct 15, 2009, 12:39:35 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Added a hack for "Workplace Sans" to make Qt think it supports all scripts (Unicode and codepage ranges in the header indicate that it only supports Latin1 but it's much less than the actual number of scripts which include Greek, Cyrillic and even Japanese, which are supported at least partially).

File:
1 edited

Legend:

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

    r226 r227  
    195195            family->fixedPitch = face->face_flags & FT_FACE_FLAG_FIXED_WIDTH;
    196196
    197             if (systems.isEmpty()) {
     197            if (systems.isEmpty() || familyName == "Workplace Sans") {
    198198                // it was hard or impossible to determine the actual writing system
    199199                // of the font (as in case of OS/2 bitmap and PFB fonts for which it is
    200200                // usually simply reported that they support standard/system codepages).
    201201                // Pretend that we support all writing systems to not miss the one.
    202                 // @todo find a way to detect it properly to make sure these fonts
    203                 // are not matched for scripts they don't support
     202                // Note that "Workplace Sans" TTF by Alex Taylor doesn't provide correct
     203                // unicode and codepage ranges in os2_table for some reason but versions
     204                // 0.4 and earlier are known to support many popular scripts so hack it.
     205                //
     206                // @todo find a proper way to detect actual supported scripts to make
     207                // sure these fonts are not matched for scripts they don't support
    204208                for (int ws = 0; ws < QFontDatabase::WritingSystemsCount; ++ws)
    205209                    family->writingSystems[ws] = QtFontFamily::Supported;
     
    395399        if (!desc.family)
    396400            break;
     401        FM_DEBUG("loadPM: ============== matched '%s'", qPrintable(desc.family->name));
    397402        fe = loadEngine(req, desc);
    398403        if (!fe)
Note: See TracChangeset for help on using the changeset viewer.