Changeset 226 for trunk/src/gui/text/qfont_pm.cpp
- Timestamp:
- Oct 14, 2009, 11:07:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/text/qfont_pm.cpp
r95 r226 51 51 QT_BEGIN_NAMESPACE 52 52 53 Q_GUI_EXPORT const char *qt_fontFamilyFromStyleHint(const QFontDef &request) 54 { 55 const char *family = 0; 56 switch (request.styleHint) { 57 case QFont::Helvetica: 58 family = "Helvetica"; 59 break; 60 case QFont::Times: 61 case QFont::OldEnglish: 62 family = "Times New Roman"; 63 break; 64 case QFont::Courier: 65 family = "Courier"; 66 break; 67 case QFont::System: 68 family = "WarpSans"; 69 break; 70 case QFont::AnyStyle: 71 if (request.fixedPitch) 72 family = "Courier"; 73 else 74 family = "Helvetica"; 75 break; 76 } 77 return family; 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("Helvetica"); 96 111 } 97 112 98 113 QString QFont::lastResortFont() const 99 114 { 100 return QString::fromLatin1(" arial");115 return QString::fromLatin1("Helvetica"); 101 116 } 102 117
Note:
See TracChangeset
for help on using the changeset viewer.