aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/pdf/SkPDFFont.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 382c93a2ad..e0da5af4f4 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -664,8 +664,8 @@ void SkPDFFont::populateType3Font(int16_t glyphID) {
characterName.printf("gid%d", gID);
encDiffs->append(new SkPDFName(characterName))->unref();
- const SkGlyph glyph = cache->getGlyphIDMetrics(gID);
- appendWidth(SkFixedToFloat(glyph.fAdvanceX), 1000, widthArray.get());
+ const SkGlyph& glyph = cache->getGlyphIDMetrics(gID);
+ widthArray->append(new SkPDFScalar(SkFixedToScalar(glyph.fAdvanceX)))->unref();
SkIRect glyphBBox = SkIRect::MakeXYWH(glyph.fLeft, glyph.fTop,
glyph.fWidth, glyph.fHeight);
bbox.join(glyphBBox);