Changeset 226
- Timestamp:
- Oct 14, 2009, 11:07:33 PM (16 years ago)
- Location:
- trunk/src/gui/text
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/text/qfont_p.h
r2 r226 274 274 }; 275 275 276 277 278 279 276 280 QT_END_NAMESPACE 277 281 -
trunk/src/gui/text/qfont_pm.cpp
r95 r226 51 51 QT_BEGIN_NAMESPACE 52 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 53 80 /***************************************************************************** 54 81 QFont member functions … … 76 103 QString QFont::defaultFamily() const 77 104 { 78 switch(d->request.styleHint) { 79 case QFont::Times: 80 return QString::fromLatin1("Times New Roman"); 81 case QFont::Courier: 82 return QString::fromLatin1("Courier New"); 83 case QFont::Decorative: 84 return QString::fromLatin1("Bookman Old Style"); 85 case QFont::Helvetica: 86 return QString::fromLatin1("Arial"); 87 case QFont::System: 88 default: 89 return QString::fromLatin1("MS Sans Serif"); 90 } 105 return QLatin1String(qt_fontFamilyFromStyleHint(d->request)); 91 106 } 92 107 93 108 QString QFont::lastResortFamily() const 94 109 { 95 return QString::fromLatin1(" helvetica");110 return QString::fromLatin1("elvetica"); 96 111 } 97 112 98 113 QString QFont::lastResortFont() const 99 114 { 100 return QString::fromLatin1(" arial");115 return QString::fromLatin1(""); 101 116 } 102 117 -
trunk/src/gui/text/qfontdatabase_pm.cpp
r223 r226 302 302 } 303 303 304 static const char *styleHint(const QFontDef &request)305 {306 const char *stylehint = 0;307 switch (request.styleHint) {308 case QFont::SansSerif:309 stylehint = "Helvetica";310 break;311 case QFont::Serif:312 stylehint = "Roman";313 break;314 case QFont::TypeWriter:315 stylehint = "Courier";316 break;317 default:318 if (request.fixedPitch)319 stylehint = "Courier";320 else321 stylehint = "Helvetica";322 break;323 }324 return stylehint;325 }326 327 304 static QFontDef fontDescToFontDef(const QFontDef &req, const QtFontDesc &desc) 328 305 { … … 387 364 QStringList families = familyList(req); 388 365 389 const char *style hint = styleHint(d->request);390 if (style hint)391 families << QLatin1String(style hint);366 const char *styletyleHint(d->request); 367 if (styleint) 368 families << QLatin1String(styleint); 392 369 393 370 // add the default family
Note:
See TracChangeset
for help on using the changeset viewer.