Title: [173221] trunk/Source/WebCore
Revision
173221
Author
[email protected]
Date
2014-09-03 13:26:52 -0700 (Wed, 03 Sep 2014)

Log Message

iOS build fix after r173217 

* platform/graphics/ios/FontServicesIOS.h:
(WebCore::FontServicesIOS::capHeight):
* platform/graphics/ios/FontServicesIOS.mm:
(WebCore::FontServicesIOS::FontServicesIOS):
This fixes the build, but I don't know if it's completely correct.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173220 => 173221)


--- trunk/Source/WebCore/ChangeLog	2014-09-03 20:18:36 UTC (rev 173220)
+++ trunk/Source/WebCore/ChangeLog	2014-09-03 20:26:52 UTC (rev 173221)
@@ -1,3 +1,13 @@
+2014-09-03  Tim Horton  <[email protected]>
+
+        iOS build fix after r173217 
+
+        * platform/graphics/ios/FontServicesIOS.h:
+        (WebCore::FontServicesIOS::capHeight):
+        * platform/graphics/ios/FontServicesIOS.mm:
+        (WebCore::FontServicesIOS::FontServicesIOS):
+        This fixes the build, but I don't know if it's completely correct.
+
 2014-09-03  Anders Carlsson  <[email protected]>
 
         Get rid of DOMImplementationFront

Modified: trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.h (173220 => 173221)


--- trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.h	2014-09-03 20:18:36 UTC (rev 173220)
+++ trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.h	2014-09-03 20:26:52 UTC (rev 173221)
@@ -36,6 +36,7 @@
     CGFloat lineGap() { return m_lineGap; }
     CGFloat lineSpacing() { return m_lineSpacing; }
     CGFloat xHeight() { return m_xHeight; }
+    CGFloat capHeight() { return m_capHeight; }
     unsigned unitsPerEm() { return m_unitsPerEm; }
 
 private:
@@ -44,6 +45,7 @@
     CGFloat m_lineGap;
     CGFloat m_lineSpacing;
     CGFloat m_xHeight;
+    CGFloat m_capHeight;
     unsigned m_unitsPerEm;
 };
 

Modified: trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.mm (173220 => 173221)


--- trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.mm	2014-09-03 20:18:36 UTC (rev 173220)
+++ trunk/Source/WebCore/platform/graphics/ios/FontServicesIOS.mm	2014-09-03 20:26:52 UTC (rev 173221)
@@ -68,18 +68,22 @@
     CGFloat lineGap;
     CGFloat ascent;
     CGFloat descent;
+    CGFloat capHeight;
     static bool isiOS7OrLater = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_7_0;
     if (isiOS7OrLater) {
         // Use CoreText API in iOS 7.
         ascent = CTFontGetAscent(font);
         descent = CTFontGetDescent(font);
         lineGap = CTFontGetLeading(font);
+        capHeight = CTFontGetCapHeight(font);
     } else {
         float pointSize = CTFontGetSize(font);
         const CGFontHMetrics *metrics = CGFontGetHMetrics(cgFont.get());
         unsigned unitsPerEm = CGFontGetUnitsPerEm(cgFont.get());
+        unsigned capHeightInGlyphSpace = CGFontGetCapHeight(cgFont.get());
 
         lineGap = (dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_3_0) ? scaleEmToUnits(metrics->lineGap, unitsPerEm) * pointSize : 0.0;
+        capHeight = scaleEmToUnits(capHeightInGlyphSpace, unitsPerEm) * pointSize;
 
         bool isiOS6OrLater = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_6_0;
         if (!isiOS6OrLater || !isCourier(font)) {
@@ -98,6 +102,7 @@
     m_descent = descent;
     m_lineGap = ceilf(lineGap);
     m_lineSpacing = ceil(ascent) + adjustment + ceil(descent) + m_lineGap;
+    m_capHeight = capHeight;
 }
 
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to