[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:04:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 734ad1e2489f7317e9a9a33ca7c2ee3d825e51d0
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 22 00:10:17 2003 +0000

    	Don't use small caps font for characters that don't have an
    	uppercase counterpart (i.e. punctuation marks).
    
            Reviewed by Hyatt.
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (widthForNextCharacter):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1dec757..2342a68 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2003-10-21  Richard Williamson   <rjw at apple.com>
+
+	Don't use small caps font for characters that don't have an
+	uppercase counterpart (i.e. punctuation marks).
+
+        Reviewed by Hyatt.
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (widthForNextCharacter):
+
 2003-10-21  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index b36561a..8a93466 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -1810,11 +1810,14 @@ static float widthForNextCharacter (CharacterWidthIterator *iterator, ATSGlyphRe
     // If small-caps convert lowercase to upper.
     if (renderer->isSmallCapsRenderer) {
         if (!isUpper(c)) {
-            c = toUpper(c);
-            useSmallCapsFont = YES;
+            // Only use small cap font if the the uppercase version of the character
+            // is different than the lowercase.
+            UniChar newC = toUpper(c);
+            if (newC != c) {
+                useSmallCapsFont = YES;
+                c = newC;
+            }
         }
-        else
-            useSmallCapsFont = NO;
     }
             
     // Get a glyph for the next characters.  Somewhat complicated by surrogate

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list