Title: [96374] trunk
Revision
96374
Author
[email protected]
Date
2011-09-29 16:12:02 -0700 (Thu, 29 Sep 2011)

Log Message

Follow-up fix for <rdar://problem/10191243> Glyph variants (line final swashes) appear where they should not

Reviewed by Simon Fraser.

Source/WebCore: 

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont): Check for Hoefler Text Black Italic as well.

LayoutTests: 

Added Hoefler Text Black Italic to the test case.

* fast/text/line-initial-and-final-swashes.html:
* platform/mac/fast/text/line-initial-and-final-swashes-expected.png:
* platform/mac/fast/text/line-initial-and-final-swashes-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (96373 => 96374)


--- trunk/LayoutTests/ChangeLog	2011-09-29 23:09:42 UTC (rev 96373)
+++ trunk/LayoutTests/ChangeLog	2011-09-29 23:12:02 UTC (rev 96374)
@@ -1,3 +1,15 @@
+2011-09-29  Dan Bernstein  <[email protected]>
+
+        Follow-up fix for <rdar://problem/10191243> Glyph variants (line final swashes) appear where they should not
+
+        Reviewed by Simon Fraser.
+
+        Added Hoefler Text Black Italic to the test case.
+
+        * fast/text/line-initial-and-final-swashes.html:
+        * platform/mac/fast/text/line-initial-and-final-swashes-expected.png:
+        * platform/mac/fast/text/line-initial-and-final-swashes-expected.txt:
+
 2011-09-29  Adam Barth  <[email protected]>
 
         This test can also time out.

Modified: trunk/LayoutTests/fast/text/line-initial-and-final-swashes.html (96373 => 96374)


--- trunk/LayoutTests/fast/text/line-initial-and-final-swashes.html	2011-09-29 23:09:42 UTC (rev 96373)
+++ trunk/LayoutTests/fast/text/line-initial-and-final-swashes.html	2011-09-29 23:12:02 UTC (rev 96374)
@@ -1,7 +1,11 @@
 <p>
-    The blue text should be identical to, and overlap, the red text, so there should be no red pixels below.
+    The black text should be identical to, and overlap, the red text, so there should be no red pixels below.
 </p>
 <div style="font-size: 144px; font-family: Hoefler Text; font-style: italic; -webkit-font-smoothing: none;">
     <div style="color: red;">v a&#x0300; e</div>
     <div style="margin-top: -144px;">v &#xe0; e</div>
 </div>
+<div style="font-size: 144px; font-family: Hoefler Text; font-style: italic; font-weight: bold; -webkit-font-smoothing: none;">
+    <div style="color: red;">v a&#x0300; e</div>
+    <div style="margin-top: -144px;">v &#xe0; e</div>
+</div>

Modified: trunk/LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.txt (96373 => 96374)


--- trunk/LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.txt	2011-09-29 23:09:42 UTC (rev 96373)
+++ trunk/LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.txt	2011-09-29 23:12:02 UTC (rev 96374)
@@ -4,8 +4,8 @@
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderBlock {P} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 635x18
-          text run at (0,0) width 635: "The blue text should be identical to, and overlap, the red text, so there should be no red pixels below."
+        RenderText {#text} at (0,0) size 642x18
+          text run at (0,0) width 642: "The black text should be identical to, and overlap, the red text, so there should be no red pixels below."
       RenderBlock {DIV} at (0,34) size 784x144
         RenderBlock {DIV} at (0,0) size 784x144 [color=#FF0000]
           RenderText {#text} at (0,0) size 256x144
@@ -13,3 +13,10 @@
         RenderBlock {DIV} at (0,0) size 784x144
           RenderText {#text} at (0,0) size 256x144
             text run at (0,0) width 256: "v \x{E0} e"
+      RenderBlock {DIV} at (0,178) size 784x144
+        RenderBlock {DIV} at (0,0) size 784x144 [color=#FF0000]
+          RenderText {#text} at (0,0) size 293x144
+            text run at (0,0) width 293: "v a\x{300} e"
+        RenderBlock {DIV} at (0,0) size 784x144
+          RenderText {#text} at (0,0) size 293x144
+            text run at (0,0) width 293: "v \x{E0} e"

Modified: trunk/Source/WebCore/ChangeLog (96373 => 96374)


--- trunk/Source/WebCore/ChangeLog	2011-09-29 23:09:42 UTC (rev 96373)
+++ trunk/Source/WebCore/ChangeLog	2011-09-29 23:12:02 UTC (rev 96374)
@@ -1,3 +1,12 @@
+2011-09-29  Dan Bernstein  <[email protected]>
+
+        Follow-up fix for <rdar://problem/10191243> Glyph variants (line final swashes) appear where they should not
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+        (WebCore::FontPlatformData::ctFont): Check for Hoefler Text Black Italic as well.
+
 2011-09-29  Cary Clark  <[email protected]>
 
         Enable LCD text in Skia on Mac

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (96373 => 96374)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2011-09-29 23:09:42 UTC (rev 96373)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2011-09-29 23:12:02 UTC (rev 96374)
@@ -252,7 +252,7 @@
         CTFontDescriptorRef fontDescriptor;
         RetainPtr<CFStringRef> postScriptName(AdoptCF, CTFontCopyPostScriptName(m_CTFont.get()));
         // Hoefler Text Italic has line-initial and -final swashes enabled by default, so disable them.
-        if (CFEqual(postScriptName.get(), CFSTR("HoeflerText-Italic")))
+        if (CFEqual(postScriptName.get(), CFSTR("HoeflerText-Italic")) || CFEqual(postScriptName.get(), CFSTR("HoeflerText-BlackItalic")))
             fontDescriptor = cascadeToLastResortAndDisableSwashesFontDescriptor();
         else
             fontDescriptor = cascadeToLastResortFontDescriptor();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to