Lines Matching defs:font

57 // symbols vs. characters.  Rarely is a font the right character set to call it
92 * some additional state indicating which subset of the font is used. It
125 SkFont font;
126 font.setHinting(SkFontHinting::kNone);
127 font.setTypeface(sk_ref_sp(typeface));
128 font.setSize(1000); // glyph coordinate system
131 // This probably isn't very good with an italic font.
134 uint16_t g = font.unicharToGlyph(c);
136 font.getBounds(&g, 1, &bounds, nullptr);
145 uint16_t g = font.unicharToGlyph(c);
147 font.getBounds(&g, 1, &bounds, nullptr);
283 static void emit_subset_type0(const SkPDFFont& font, SkPDFDocument* doc) {
285 SkPDFFont::GetMetrics(font.typeface(), doc);
290 SkAdvancedTypefaceMetrics::FontType type = font.getType();
291 SkTypeface* face = font.typeface();
295 uint16_t emSize = SkToU16(font.typeface()->getUnitsPerEm());
310 SkASSERT(font.firstGlyphID() == 1);
312 stream_to_data(std::move(fontAsset)), font.glyphUsage(),
325 // If subsetting fails, fall back to original font data.
375 *face, font.glyphUsage(), &defaultWidth);
393 SkPDFFont::GetUnicodeMap(font.typeface(), doc);
394 SkASSERT(SkToSizeT(font.typeface()->countGlyphs()) == glyphToUnicode.size());
397 &font.glyphUsage(),
398 font.multiByteGlyphs(),
399 font.firstGlyphID(),
400 font.lastGlyphID());
403 doc->emit(fontDict, font.indirectReference());
519 SkFont font(sk_ref_sp(&typeface), kBitmapFontSize);
520 font.setHinting(SkFontHinting::kNone);
521 font.setEdging(SkFont::Edging::kAlias);
522 return SkStrikeSpec::MakeMask(font,
554 SkPDFDict font("Font");
555 font.insertName("Subtype", "Type3");
559 font.insertObject("FontMatrix", SkPDFUtils::MatrixToArray(fontMatrix));
635 font.insertObject("Resources", std::move(d1));
639 font.insertInt("FirstChar", 0);
640 font.insertInt("LastChar", lastGlyphID - firstGlyphID + 1);
642 system, specifying the font bounding box. This is the smallest
644 glyphs of the font were placed with their origins coincident and
646 font.insertObject("FontBBox", SkPDFMakeArray(bbox.left(),
651 font.insertName("CIDToGIDMap", "Identity");
660 font.insertRef("ToUnicode", SkPDFStreamOut(nullptr, std::move(toUnicodeCmap), doc));
661 font.insertRef("FontDescriptor", type3_descriptor(doc, typeface, xHeight));
662 font.insertObject("Widths", std::move(widthArray));
663 font.insertObject("Encoding", std::move(encoding));
664 font.insertObject("CharProcs", std::move(charProcs));
666 doc->emit(font, pdfFont.indirectReference());