Support fCapHeight in SkScalerContext_DW

BUG=chromium:681857

Change-Id: Ia97354d7798eb685351a98ff559bcf176a67af18
Reviewed-on: https://skia-review.googlesource.com/7380
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Koji Ishii 2017-01-22 02:30:51 +09:00 committed by Skia Commit-Bot
parent 918e144408
commit a6725fcb14

View File

@ -574,6 +574,7 @@ void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* metrics) {
metrics->fDescent = fTextSizeRender * SkIntToScalar(dwfm.descent) / upem;
metrics->fLeading = fTextSizeRender * SkIntToScalar(dwfm.lineGap) / upem;
metrics->fXHeight = fTextSizeRender * SkIntToScalar(dwfm.xHeight) / upem;
metrics->fCapHeight = fTextSizeRender * SkIntToScalar(dwfm.capHeight) / upem;
metrics->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem;
metrics->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem);