SkPDF: Subset Type3 (fallback) font
Motivation: significant file-size reduction.
Also: SkPDFFont::subsetFont() returns a sk_sp<SkPDFObject>
rather than a SkPDFFont*.
SkPDFType3Font constructor no longer populates font info;
relies on subsetting.
SkPDFFont::Create is easier to read
Also: SkPDFType3Font are scaled by emSize rather than 1000.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231483002
Review-Url: https://codereview.chromium.org/2231483002
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 7723caf..4a577fc 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -483,8 +483,8 @@
// Build font subsetting info before calling addObjectRecursively().
for (const auto& entry : fGlyphUsage) {
- sk_sp<SkPDFFont> subsetFont(
- entry.fFont->getFontSubset(&entry.fGlyphSet));
+ sk_sp<SkPDFObject> subsetFont =
+ entry.fFont->getFontSubset(&entry.fGlyphSet);
if (subsetFont) {
fObjectSerializer.fSubstituteMap.setSubstitute(
entry.fFont, subsetFont.get());