initialize font metrics for pdf (found by valgrind)

TBR=halcanary@google.com

Review URL: https://codereview.chromium.org/1175253004
This commit is contained in:
caryclark 2015-06-11 06:46:21 -07:00 committed by Commit bot
parent 4cd6713af1
commit 0edd96538e

View File

@ -145,11 +145,13 @@ SkAdvancedTypefaceMetrics* SkTestTypeface::onGetAdvancedTypefaceMetrics(
uint32_t glyphIDsCount) const {
// pdf only
SkAdvancedTypefaceMetrics* info = new SkAdvancedTypefaceMetrics;
info->fFontName.set(fTestFont->fName);
info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
info->fFlags = SkAdvancedTypefaceMetrics::kEmpty_FontFlag;
info->fLastGlyphID = static_cast<uint16_t>(fTestFont->fCharCodesCount - 1);
info->fEmSize = 0;
info->fLastGlyphID = SkToU16(onCountGlyphs() - 1);
info->fStyle = 0;
info->fFontName.set(fTestFont->fName);
info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
info->fItalicAngle = 0;
info->fAscent = 0;
info->fDescent = 0;