void tst_QFontDatabase::trickyFonts() { QFETCH(QString, font); QFontDatabase fdb; if (!fdb.families().contains(font)) QSKIP( "Font not installed", SkipSingle); QFont qfont(font); QFontInfo fi(qfont); QCOMPARE(fi.family(), font); }
void tst_QFontDatabase::fixedPitch() { QFETCH(QString, font); QFETCH(bool, fixedPitch); QFontDatabase fdb; if (!fdb.families().contains(font)) QSKIP( "Font not installed"); QCOMPARE(fdb.isFixedPitch(font), fixedPitch); QFont qfont(font); QFontInfo fi(qfont); QCOMPARE(fi.fixedPitch(), fixedPitch); }
void tst_QFontDatabase::fixedPitch() { #ifdef Q_WS_QWS QSKIP("fixedPitch not implemented for Qtopia Core", SkipAll); #endif QFETCH(QString, font); QFETCH(bool, fixedPitch); QFontDatabase fdb; if (!fdb.families().contains(font)) QSKIP( "Font not installed", SkipSingle); QCOMPARE(fdb.isFixedPitch(font), fixedPitch); QFont qfont(font); QFontInfo fi(qfont); QCOMPARE(fi.fixedPitch(), fixedPitch); }
void CQIllustratorCreateTextToolbar:: updateFontFromWidgets() { QString name = fontCombo_->itemText(fontCombo_->currentIndex()); font_size_ = sizeCombo_->itemText(sizeCombo_->currentIndex()).toInt(); int weight = QFont::Normal; if (boldButton_->isChecked()) weight = QFont::Bold; bool italic = italicButton_->isChecked(); QFont qfont(name, font_size_, weight, italic); qfont_ = qfont; updateShape(); updateFontWidgets(); }