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

Unified Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp

Issue 1450303002: (DO NOT LAND, EXPERIMENTAL) os/2 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
index 6d297e9356bb5d445c511a4526d09a0c2074836b..c1d14ab0a4127c2190d5599bd80550f3c96b2606 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
@@ -37,6 +37,7 @@
#include "SkUtils.h"
#include "platform/fonts/FontDescription.h"
#include "platform/fonts/GlyphPage.h"
+#include "platform/fonts/OpenType/OpenTypeOS2Table.h"
#include "platform/fonts/VDMXParser.h"
#include "platform/geometry/FloatRect.h"
#include "wtf/MathExtras.h"
@@ -100,6 +101,9 @@ void SimpleFontData::platformInit()
SkTypeface* face = paint.getTypeface();
ASSERT(face);
+ int16_t ascentInUnits, descentInUnits;
+ getAscentDescentFromOS2Table(face, ascentInUnits, descentInUnits);
+
int vdmxAscent = 0, vdmxDescent = 0;
bool isVDMXValid = false;

Powered by Google App Engine
This is Rietveld 408576698