Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp

Issue 1163323003: sky/engine updates for iOS targets (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp
diff --git a/sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp b/sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp
index 7da785a400d3039684b5ae78953c23266d33c48d..97ed2aba8311af01ccb7724279235080ab08464d 100644
--- a/sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp
+++ b/sky/engine/platform/fonts/skia/SimpleFontDataSkia.cpp
@@ -68,7 +68,7 @@ void SimpleFontData::platformInit()
int vdmxAscent = 0, vdmxDescent = 0;
bool isVDMXValid = false;
-#if OS(LINUX) || OS(ANDROID)
+#if OS(LINUX) || OS(ANDROID) || OS(IOS)
// Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType.
// With GDI, the metrics will already have taken this into account (as needed).
// With DirectWrite or CoreText, no bytecode hinting is ever done.
@@ -102,7 +102,7 @@ void SimpleFontData::platformInit()
} else {
ascent = SkScalarRoundToInt(-metrics.fAscent);
descent = SkScalarRoundToInt(metrics.fDescent);
-#if OS(LINUX) || OS(ANDROID)
+#if OS(LINUX) || OS(ANDROID) || OS(IOS)
// When subpixel positioning is enabled, if the descent is rounded down, the descent part
// of the glyph may be truncated when displayed in a 'overflow: hidden' container.
// To avoid that, borrow 1 unit from the ascent when possible.

Powered by Google App Engine
This is Rietveld 408576698