summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--skia/include/SkPaint.h6
-rw-r--r--skia/ports/SkFontHost_FreeType.cpp9
3 files changed, 9 insertions, 8 deletions
diff --git a/DEPS b/DEPS
index 24fd394..d73f05a 100644
--- a/DEPS
+++ b/DEPS
@@ -19,7 +19,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@214",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@13198",
+ "/trunk/deps/third_party/WebKit@13293",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@13083",
diff --git a/skia/include/SkPaint.h b/skia/include/SkPaint.h
index dea8de6..b871bda 100644
--- a/skia/include/SkPaint.h
+++ b/skia/include/SkPaint.h
@@ -618,10 +618,8 @@ public:
SkScalar fLeading; //!< The recommended distance to add between lines of text (will be >= 0)
SkScalar fHeight; //!< the vertical distance between two consecutive baselines (>= 0)
SkScalar fAvgCharWidth; //!< the average charactor width (>= 0)
- SkScalar fXRange; //!< This is the maximum range of X bounding box points
- // in units of em. It's used to calculate a value which
- // matches Windows's GetTextMetrics tmMaxCharWidth
- // member exactly.
+ SkScalar fXMin; //!< The minimum bounding box x value for all glyphs
+ SkScalar fXMax; //!< The maximum bounding box x value for all glyphs
SkScalar fXHeight; //!< the height of an 'x' in px, or 0 if no 'x' in face
// VDMX values are exact ascent and descent values for scalable fonts at
diff --git a/skia/ports/SkFontHost_FreeType.cpp b/skia/ports/SkFontHost_FreeType.cpp
index 56ea08d..8ffb3ca 100644
--- a/skia/ports/SkFontHost_FreeType.cpp
+++ b/skia/ports/SkFontHost_FreeType.cpp
@@ -867,7 +867,8 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx,
SkFixed scaleY = fScaleY;
SkFixed mxy = fMatrix22.xy;
SkFixed myy = fMatrix22.yy;
- SkScalar xrange = static_cast<SkScalar>(face->bbox.xMax - face->bbox.xMin) / upem;
+ SkScalar xmin = static_cast<SkScalar>(face->bbox.xMin) / upem;
+ SkScalar xmax = static_cast<SkScalar>(face->bbox.xMax) / upem;
int leading = face->height - face->ascender + face->descender;
if (leading < 0) {
@@ -918,7 +919,8 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx,
mx->fLeading = pts[4].fX;
mx->fHeight = pts[5].fX;
mx->fAvgCharWidth = pts[6].fX;
- mx->fXRange = xrange;
+ mx->fXMin = xmin;
+ mx->fXMax = xmax;
mx->fXHeight = x_height;
// The VDMX metrics only make sense in the horizontal direction
@@ -933,7 +935,8 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx,
my->fLeading = pts[4].fY;
my->fHeight = pts[5].fY;
my->fAvgCharWidth = pts[6].fY;
- my->fXRange = xrange;
+ my->fXMin = xmin;
+ my->fXMax = xmax;
my->fXHeight = x_height;
my->fVDMXMetricsValid = false;