Fill capHeight and maxCharWidth on Mac.

BUG=skia:3924

Review URL: https://codereview.chromium.org/1164423006
This commit is contained in:
bungeman 2015-06-09 08:40:51 -07:00 committed by Commit bot
parent 2c55d7b7f3
commit 6bd8d1c44b

View File

@ -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));