diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
commit | aa9cf406d62004519ad54596e1c391f9a6439210 (patch) | |
tree | dd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp | |
parent | 987aec28b950e1c9817a20a9dd71afc071cd93ea (diff) | |
parent | 56b6a5924008ab5cdbae36e9662eddba923acd5e (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp index f0dd3ea4a..7709be6b4 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp @@ -1,5 +1,6 @@ /* Copyright (C) 2008 Holger Hans Peter Freyther + Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -21,6 +22,8 @@ #include "config.h" #include "FontPlatformData.h" +#include "PlatformString.h" + namespace WebCore { FontPlatformData::FontPlatformData(const FontDescription& description, int wordSpacing, int letterSpacing) @@ -40,11 +43,9 @@ FontPlatformData::FontPlatformData(const FontDescription& description, int wordS m_font.setFamily(familyName); m_font.setPixelSize(qRound(description.computedSize())); m_font.setItalic(description.italic()); - // FIXME: Map all FontWeight values to QFont weights. - if (description.weight() >= FontWeight600) - m_font.setWeight(QFont::Bold); - else - m_font.setWeight(QFont::Normal); + + m_font.setWeight(toQFontWeight(description.weight())); + m_bold = m_font.bold(); bool smallCaps = description.smallCaps(); m_font.setCapitalization(smallCaps ? QFont::SmallCaps : QFont::MixedCase); @@ -77,4 +78,11 @@ FontPlatformData::FontPlatformData() { } +#ifndef NDEBUG +String FontPlatformData::description() const +{ + return String(); +} +#endif + } |