diff options
author | caryclark <caryclark@google.com> | 2015-06-11 06:46:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-11 06:46:21 -0700 |
commit | 0edd96538e41a43c18e955726d5a10117c1f817e (patch) | |
tree | 40d00e32fdf53ecd722605acae8553163d8c8c31 /src | |
parent | 4cd6713af1c699b79e04b590109768300faee531 (diff) |
initialize font metrics for pdf (found by valgrind)
TBR=halcanary@google.com
Review URL: https://codereview.chromium.org/1175253004
Diffstat (limited to 'src')
-rw-r--r-- | src/fonts/SkTestScalerContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp index ed98dba19e..194cd0907c 100644 --- a/src/fonts/SkTestScalerContext.cpp +++ b/src/fonts/SkTestScalerContext.cpp @@ -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; |