class SkPDFStrike : public SkRefCnt {
public: /** Make or return an existing SkPDFStrike, canonicalizing for resource de-duplication. *TheSkPDFStrikeisownedbytheSkPDFDocument.
*/ static sk_sp<SkPDFStrike> Make(SkPDFDocument* doc, const SkFont&, const SkPaint&);
/** Get the font resource for the glyph. *ThereturnedSkPDFFontisownedbytheSkPDFStrike. *@paramglyphTheglyphofinterest
*/
SkPDFFont* getFontResource(const SkGlyph* glyph);
/** Returns the font type represented in this font. For Type0 fonts, *returnsthetypeofthedescendantfont.
*/
SkAdvancedTypefaceMetrics::FontType getType() const { return fFontType; }
staticbool IsMultiByte(SkAdvancedTypefaceMetrics::FontType type) { return type == SkAdvancedTypefaceMetrics::kType1CID_Font ||
type == SkAdvancedTypefaceMetrics::kTrueType_Font ||
type == SkAdvancedTypefaceMetrics::kCFF_Font;
}
/** Returns true if this font encoding supports glyph IDs above 255.
*/ bool multiByteGlyphs() const { return SkPDFFont::IsMultiByte(this->getType()); }
/** Return true if this font has an encoding for the passed glyph id.
*/ bool hasGlyph(SkGlyphID gid) { return (gid >= this->firstGlyphID() && gid <= this->lastGlyphID()) || gid == 0;
}
/** Convert the input glyph ID into the font encoding. */
SkGlyphID glyphToPDFFontEncoding(SkGlyphID gid) const { if (this->multiByteGlyphs() || gid == 0) { return gid;
}
SkASSERT(gid >= this->firstGlyphID() && gid <= this->lastGlyphID());
SkASSERT(this->firstGlyphID() > 0); return gid - this->firstGlyphID() + 1;
}
SkPDFFont(const SkPDFStrike*,
SkGlyphID firstGlyphID,
SkGlyphID lastGlyphID,
SkAdvancedTypefaceMetrics::FontType fontType,
SkPDFIndirectReference indirectReference); // The glyph IDs accessible with this font. For Type1 (non CID) fonts, // this will be a subset if the font has more than 255 glyphs.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.