summaryrefslogtreecommitdiffstats
path: root/tools/shared/fontpanel/fontpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shared/fontpanel/fontpanel.cpp')
-rw-r--r--tools/shared/fontpanel/fontpanel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp
index ad297df..fe221fd 100644
--- a/tools/shared/fontpanel/fontpanel.cpp
+++ b/tools/shared/fontpanel/fontpanel.cpp
@@ -96,8 +96,12 @@ QFont FontPanel::selectedFont() const
const QString family = rc.family();
rc.setPointSize(pointSize());
const QString styleDescription = styleString();
- rc.setItalic(m_fontDatabase.italic(family, styleDescription));
-
+ if (styleDescription.contains(QLatin1String("Italic")))
+ rc.setStyle(QFont::StyleItalic);
+ else if (styleDescription.contains(QLatin1String("Oblique")))
+ rc.setStyle(QFont::StyleOblique);
+ else
+ rc.setStyle(QFont::StyleNormal);
rc.setBold(m_fontDatabase.bold(family, styleDescription));
// Weight < 0 asserts...