Changeset 228 for trunk/src/gui/text/qfontdatabase_pm.cpp
- Timestamp:
- Oct 15, 2009, 2:04:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/text/qfontdatabase_pm.cpp
r227 r228 50 50 #include FT_TYPES_H 51 51 #include FT_TRUETYPE_TABLES_H 52 #include FT_LCD_FILTER_H 52 53 53 54 QT_BEGIN_NAMESPACE … … 195 196 family->fixedPitch = face->face_flags & FT_FACE_FLAG_FIXED_WIDTH; 196 197 197 if (systems.isEmpty() || familyName == "Workplace Sans") {198 if (systems.isEmpty() || familyName.compare("Workplace Sans")) { 198 199 // it was hard or impossible to determine the actual writing system 199 200 // of the font (as in case of OS/2 bitmap and PFB fonts for which it is … … 347 348 static QFontEngine *loadEngine(const QFontDef &req, const QtFontDesc &desc) 348 349 { 349 QFontEngineFT *fe = new QFontEnginePMFT(fontDescToFontDef(req, desc)); 350 // @todo all these fixed so far; make configurable through the Registry 351 // on per-family basis 352 QFontEnginePMFT::HintStyle hintStyle = QFontEnginePMFT::HintFull; 353 bool autoHint = true; 354 QFontEngineFT::SubpixelAntialiasingType subPixel = QFontEngineFT::Subpixel_None; 355 int lcdFilter = FT_LCD_FILTER_DEFAULT; 356 bool useEmbeddedBitmap = true; 357 358 QFontEngine::FaceId faceId; 359 faceId.filename = desc.size->fileName; 360 faceId.index = desc.size->fileIndex; 361 362 QFontEngineFT *fe = new QFontEnginePMFT(fontDescToFontDef(req, desc), faceId, 363 desc.style->antialiased, hintStyle, 364 autoHint, subPixel, lcdFilter, 365 useEmbeddedBitmap); 350 366 Q_ASSERT(fe); 351 if (fe) { 352 QFontEngine::FaceId faceId; 353 faceId.filename = desc.size->fileName; 354 faceId.index = desc.size->fileIndex; 355 fe->init(faceId, desc.style->antialiased); 356 if (fe->invalid()) { 357 FM_DEBUG(" --> invalid!\n"); 358 delete fe; 359 fe = 0; 360 } 367 if (fe && fe->invalid()) { 368 FM_DEBUG(" --> invalid!\n"); 369 delete fe; 370 fe = 0; 361 371 } 362 372 return fe;
Note:
See TracChangeset
for help on using the changeset viewer.