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

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 1164423006: Fill capHeight and maxCharWidth on Mac. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Also maxCharWidth. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_mac.cpp
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index a184a8b3e3306e4d4d5045f92ae738d7cdfc56a0..22e295470507fda645e6a747adbe762de9e530bb 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -1393,7 +1393,9 @@ void SkScalerContext_Mac::generateFontMetrics(SkPaint::FontMetrics* metrics) {
metrics->fAvgCharWidth = CGToScalar( CGRectGetWidth_inline(theBounds));
metrics->fXMin = CGToScalar( CGRectGetMinX_inline(theBounds));
metrics->fXMax = CGToScalar( CGRectGetMaxX_inline(theBounds));
+ metrics->fMaxCharWidth = metrics->fXMax - metrics->fXMin;
metrics->fXHeight = CGToScalar( CTFontGetXHeight(fCTFont));
+ metrics->fCapHeight = CGToScalar( CTFontGetCapHeight(fCTFont));
metrics->fUnderlineThickness = CGToScalar( CTFontGetUnderlineThickness(fCTFont));
metrics->fUnderlinePosition = -CGToScalar( CTFontGetUnderlinePosition(fCTFont));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698