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

Unified Diff: src/pdf/SkPDFFont.h

Issue 334443002: [PDF] Fix font embedding restrictions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 6 months 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
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.h
diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h
index 3a5234d264a39b3638d3536a408aaf1bf9479d5c..058a0422f5f6b19e7e6476106b9b1b58a41e6dbf 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698