convert fixed->scalar directly, since we know that the

glyph's advance is already base-1000



git-svn-id: http://skia.googlecode.com/svn/trunk@973 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-03-21 21:25:35 +00:00
parent c312bf9935
commit ce11b26e82

View File

@ -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);