Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: src/pdf/SkPDFFont.h

Issue 107863002: [PDF] Fix font embedding restrictions. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Mac Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pdf/SkPDFFont.h
diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h
index 694c69ac39823e57120e75d50425cef1daf8e627..815c73ac22e00553750ce514bf5bac662ba1d85c 100644
--- a/src/pdf/SkPDFFont.h
+++ b/src/pdf/SkPDFFont.h
@@ -99,6 +99,14 @@ public:
*/
virtual bool multiByteGlyphs() const = 0;
+ /** Returns true if the machine readable licensing bits allow embedding.
+ */
+ bool canEmbed() const;
+
+ /** Returns true if the machine readable licensing bits allow subsetting.
+ */
+ bool canSubset() const;
+
/** Return true if this font has an encoding for the passed glyph id.
*/
bool hasGlyph(uint16_t glyphID);
@@ -121,8 +129,7 @@ public:
* @param typeface The typeface to find.
* @param glyphID Specify which section of a large font is of interest.
*/
- static SkPDFFont* GetFontResource(SkTypeface* typeface,
- uint16_t glyphID);
+ static SkPDFFont* GetFontResource(SkTypeface* typeface, uint16_t glyphID);
/** Subset the font based on usage set. Returns a SkPDFFont instance with
* subset.
@@ -188,8 +195,6 @@ private:
// this will be a subset if the font has more than 255 glyphs.
uint16_t fFirstGlyphID;
uint16_t fLastGlyphID;
- // The font info is only kept around after construction for large
- // Type1 (non CID) fonts that need multiple "fonts" to access all glyphs.
SkAutoTUnref<SkAdvancedTypefaceMetrics> fFontInfo;
SkTDArray<SkPDFObject*> fResources;
SkAutoTUnref<SkPDFDict> fDescriptor;
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | src/ports/SkFontHost_win.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698