Reviewed/landed by Adam.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 19:16:01 +0000 (19:16 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 19:16:01 +0000 (19:16 +0000)
        Implement containsCharacters() / determinePitch() functions.

        * platform/qt/FontDataQt.cpp:
        (WebCore::FontData::containsCharacters):
        (WebCore::FontData::determinePitch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16120 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/qt/FontDataQt.cpp

index a67a35c02f86d1f45b74b29f10b4634e59581e17..71bf94f158ab96694b0724d82e7fb9d19de66950 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed/landed by Adam.
+
+        Implement containsCharacters() / determinePitch() functions.
+
+        * platform/qt/FontDataQt.cpp:
+        (WebCore::FontData::containsCharacters):
+        (WebCore::FontData::determinePitch):
+
 2006-08-30  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Darin's rubberstamp
index 6995d467ff37294f60157aef99d0cfbf4764bdd5..e5a918d4788f6aee444a6901efbedd8c8b54e8b9 100644 (file)
@@ -75,11 +75,17 @@ FontData* FontData::smallCapsFontData(const FontDescription& fontDescription) co
 
 bool FontData::containsCharacters(const UChar* characters, int length) const
 {
+    for (int i = 0; i < length; i++) {
+        if (!QFontMetrics(m_font.font()).inFont(QChar(ushort(characters[i]))))
+            return false;
+    }
+
     return true;
 }
 
 void FontData::determinePitch()
 {
+    m_treatAsFixedPitch = m_font.isFixedPitch();
 }
 
 float FontData::platformWidthForGlyph(Glyph glyph) const