Lines Matching refs:doc

182 SkPDFFont* SkPDFFont::GetFontResource(SkPDFDocument* doc,
185 SkASSERT(doc);
187 const SkAdvancedTypefaceMetrics* fontMetrics = SkPDFFont::GetMetrics(face, doc);
200 if (SkPDFFont* found = doc->fFontMap.find(fontID)) {
220 auto ref = doc->reserveRef();
221 return doc->fFontMap.set(
283 static void emit_subset_type0(const SkPDFFont& font, SkPDFDocument* doc) {
285 SkPDFFont::GetMetrics(font.typeface(), doc);
313 doc->metadata().fSubsetter,
322 doc, true));
335 doc, true));
343 doc, true));
352 newCIDFont->insertRef("FontDescriptor", doc->emit(*descriptor));
389 descendantFonts->appendRef(doc->emit(*newCIDFont));
393 SkPDFFont::GetUnicodeMap(font.typeface(), doc);
401 fontDict.insertRef("ToUnicode", SkPDFStreamOut(nullptr, std::move(toUnicode), doc));
403 doc->emit(fontDict, font.indirectReference());
484 static SkPDFIndirectReference type3_descriptor(SkPDFDocument* doc,
487 if (SkPDFIndirectReference* ptr = doc->fType3FontDescriptors.find(typeface->uniqueID())) {
493 if (const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, doc)) {
507 SkPDFIndirectReference ref = doc->emit(descriptor);
508 doc->fType3FontDescriptors.set(typeface->uniqueID(), ref);
529 static void emit_subset_type3(const SkPDFFont& pdfFont, SkPDFDocument* doc) {
605 imageGlyphs.emplace_back(gID, SkPDFSerializeImage(pimg.fImage.get(), doc));
622 content.detachAsStream(), doc));
653 const std::vector<SkUnichar>& glyphToUnicode = SkPDFFont::GetUnicodeMap(typeface, doc);
660 font.insertRef("ToUnicode", SkPDFStreamOut(nullptr, std::move(toUnicodeCmap), doc));
661 font.insertRef("FontDescriptor", type3_descriptor(doc, typeface, xHeight));
666 doc->emit(font, pdfFont.indirectReference());
669 void SkPDFFont::emitSubset(SkPDFDocument* doc) const {
673 return emit_subset_type0(*this, doc);
676 return SkPDFEmitType1Font(*this, doc);
679 return emit_subset_type3(*this, doc);
685 bool SkPDFFont::CanEmbedTypeface(SkTypeface* typeface, SkPDFDocument* doc) {
686 const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, doc);