Fill capHeight and maxCharWidth on Mac.
BUG=skia:3924 Review URL: https://codereview.chromium.org/1164423006
This commit is contained in:
parent
2c55d7b7f3
commit
6bd8d1c44b
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user