Changeset 226 for trunk/src/gui/text/qfontdatabase_pm.cpp
- Timestamp:
- Oct 14, 2009, 11:07:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 *styleHint = qt_fontFamilyFromStyleHint(d->request); 367 if (styleHint) 368 families << QLatin1String(styleHint); 392 369 393 370 // add the default family
Note:
See TracChangeset
for help on using the changeset viewer.