aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 93abf6b3c2..ba14908c2e 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -663,8 +663,16 @@ void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) {
this->internalGetPath(glyph, NULL, path, NULL);
}
-void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* mx,
- SkPaint::FontMetrics* my) {
+void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* fm) {
+ // All of this complexity should go away when we change generateFontMetrics
+ // to just take one parameter (since it knows if it is vertical or not)
+ SkPaint::FontMetrics* mx = NULL;
+ SkPaint::FontMetrics* my = NULL;
+ if (fRec.fFlags & kVertical_Flag) {
+ mx = fm;
+ } else {
+ my = fm;
+ }
this->generateFontMetrics(mx, my);
}