[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:49:55 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 944706228867036186d13b81bf8b48803efdaa79
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 22 11:52:52 2009 +0000

    2009-10-22  Maxime Simon  <simon.maxime at gmail.com>
    
            Reviewed by Holger Freyther.
    
            [Haiku] Correction of the accented letter width (they were 2 characters long).
            https://bugs.webkit.org/show_bug.cgi?id=30629
    
            * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
            (WebCore::SimpleFontData::platformWidthForGlyph):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8df8cf7..6df4408 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-22  Maxime Simon  <simon.maxime at gmail.com>
+
+        Reviewed by Holger Freyther.
+
+        [Haiku] Correction of the accented letter width (they were 2 characters long).
+        https://bugs.webkit.org/show_bug.cgi?id=30629
+
+        * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
+        (WebCore::SimpleFontData::platformWidthForGlyph):
+
 2009-10-21  Jon Honeycutt  <jhoneycutt at apple.com>
 
         <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
diff --git a/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp b/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp
index 34941c0..adb7573 100644
--- a/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp
@@ -39,6 +39,8 @@
 #include <unicode/unorm.h>
 
 
+extern int charUnicodeToUTF8HACK(unsigned short, char*);
+
 namespace WebCore {
 
 void SimpleFontData::platformInit()
@@ -93,15 +95,15 @@ void SimpleFontData::determinePitch()
 
 float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
 {
-    const char charArray[1] = { glyph };
-    float escapements[1];
+    if (!m_platformData.font())
+        return 0;
 
-    if (m_platformData.font()) {
-        m_platformData.font()->GetEscapements(charArray, 1, escapements);
-        return escapements[0] * m_platformData.font()->Size();
-    }
+    char charArray[4];
+    float escapements[1];
 
-    return 0;
+    charUnicodeToUTF8HACK(glyph, charArray);
+    m_platformData.font()->GetEscapements(charArray, 1, escapements);
+    return escapements[0] * m_platformData.font()->Size();
 }
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list