diff options
Diffstat (limited to 'WebCore/platform/graphics/qt/FontQt.cpp')
-rw-r--r-- | WebCore/platform/graphics/qt/FontQt.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp index 5a4b7b2..e8eb923 100644 --- a/WebCore/platform/graphics/qt/FontQt.cpp +++ b/WebCore/platform/graphics/qt/FontQt.cpp @@ -47,8 +47,8 @@ namespace WebCore { static const QString qstring(const TextRun& run) { - //We don't detach - return QString::fromRawData((const QChar *)run.characters(), run.length()); + // We don't detach + return QString::fromRawData(reinterpret_cast<const QChar*>(run.characters()), run.length()); } static const QString fixSpacing(const QString &string) @@ -57,11 +57,10 @@ static const QString fixSpacing(const QString &string) QString possiblyDetached = string; for (int i = 0; i < string.length(); ++i) { const QChar c = string.at(i); - if (c.unicode() != 0x20 && Font::treatAsSpace(c.unicode())) { - possiblyDetached[i] = 0x20; //detach - } else if (c.unicode() != 0x200c && Font::treatAsZeroWidthSpace(c.unicode())) { - possiblyDetached[i] = 0x200c; //detach - } + if (c.unicode() != 0x20 && Font::treatAsSpace(c.unicode())) + possiblyDetached[i] = 0x20; // detach + else if (c.unicode() != 0x200c && Font::treatAsZeroWidthSpace(c.unicode())) + possiblyDetached[i] = 0x200c; // detach } return possiblyDetached; } @@ -222,7 +221,10 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, const IntPoint& QFont Font::font() const { - return primaryFont()->getQtFont(); + QFont f = primaryFont()->getQtFont(); + f.setLetterSpacing(QFont::AbsoluteSpacing, m_letterSpacing); + f.setWordSpacing(m_wordSpacing); + return f; } } |