Title: [93376] trunk/Source/WebCore
- Revision
- 93376
- Author
- [email protected]
- Date
- 2011-08-18 17:23:52 -0700 (Thu, 18 Aug 2011)
Log Message
<rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline
https://bugs.webkit.org/show_bug.cgi?id=66515
Reviewed by Darin Adler.
No test because none of the system fonts and test fonts have an incorrectly-specified descender value.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant
the same amount, but negative. This is consistent with what Core Text does.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (93375 => 93376)
--- trunk/Source/WebCore/ChangeLog 2011-08-19 00:18:49 UTC (rev 93375)
+++ trunk/Source/WebCore/ChangeLog 2011-08-19 00:23:52 UTC (rev 93376)
@@ -1,3 +1,16 @@
+2011-08-18 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline
+ https://bugs.webkit.org/show_bug.cgi?id=66515
+
+ Reviewed by Darin Adler.
+
+ No test because none of the system fonts and test fonts have an incorrectly-specified descender value.
+
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant
+ the same amount, but negative. This is consistent with what Core Text does.
+
2011-08-18 Ryosuke Niwa <[email protected]>
positionForPoint returns wrong VisiblePosition at bidi boundaries
Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (93375 => 93376)
--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2011-08-19 00:18:49 UTC (rev 93375)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2011-08-19 00:23:52 UTC (rev 93376)
@@ -187,7 +187,9 @@
int iLineGap;
unsigned unitsPerEm;
iAscent = CGFontGetAscent(m_platformData.cgFont());
- iDescent = CGFontGetDescent(m_platformData.cgFont());
+ // Some fonts erroneously specify a positive descender value. We follow Core Text in assuming that
+ // such fonts meant the same distance, but in the reverse direction.
+ iDescent = -abs(CGFontGetDescent(m_platformData.cgFont()));
iLineGap = CGFontGetLeading(m_platformData.cgFont());
unitsPerEm = CGFontGetUnitsPerEm(m_platformData.cgFont());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes