OLD | NEW |
1 #ifndef __DEFINED__SkPdfType1FontDictionary | 1 #ifndef __DEFINED__SkPdfType1FontDictionary |
2 #define __DEFINED__SkPdfType1FontDictionary | 2 #define __DEFINED__SkPdfType1FontDictionary |
3 | 3 |
4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
6 #include "SkPdfFontDictionary_autogen.h" | 6 #include "SkPdfFontDictionary_autogen.h" |
7 | 7 |
8 // Entries in a Type 1 font dictionary | 8 // Entries in a Type 1 font dictionary |
9 class SkPdfType1FontDictionary : public SkPdfFontDictionary { | 9 class SkPdfType1FontDictionary : public SkPdfFontDictionary { |
10 public: | 10 public: |
11 virtual SkPdfObjectType getType() const { return kType1FontDictionary_SkPdfObj
ectType;} | 11 virtual SkPdfObjectType getType() const { return kType1FontDictionary_SkPdfObj
ectType;} |
12 virtual SkPdfObjectType getTypeEnd() const { return kType1FontDictionary__End_
SkPdfObjectType;} | 12 virtual SkPdfObjectType getTypeEnd() const { return kType1FontDictionary__End_
SkPdfObjectType;} |
13 public: | 13 public: |
14 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return this;} | 14 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return this;} |
15 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
this;} | 15 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
this;} |
16 | 16 |
17 private: | 17 private: |
18 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} | 18 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} |
19 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} | 19 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} |
20 | 20 |
21 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} | |
22 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} | |
23 | |
24 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} | 21 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} |
25 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} | 22 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} |
26 | 23 |
27 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} | 24 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} |
28 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} | 25 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} |
29 | 26 |
30 public: | 27 public: |
31 private: | 28 private: |
32 public: | 29 public: |
33 SkPdfType1FontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje
ct* podofoObj = NULL) : SkPdfFontDictionary(podofoDoc, podofoObj) {} | 30 SkPdfType1FontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje
ct* podofoObj = NULL) : SkPdfFontDictionary(podofoDoc, podofoObj) {} |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return NULL; | 200 return NULL; |
204 } | 201 } |
205 | 202 |
206 /** (Optional; PDF 1.2) A stream containing a CMap file that maps character | 203 /** (Optional; PDF 1.2) A stream containing a CMap file that maps character |
207 * codes to Unicode values (see Section 5.9, "ToUnicode CMaps"). | 204 * codes to Unicode values (see Section 5.9, "ToUnicode CMaps"). |
208 **/ | 205 **/ |
209 bool has_ToUnicode() const { | 206 bool has_ToUnicode() const { |
210 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUni
code", "", NULL)); | 207 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUni
code", "", NULL)); |
211 } | 208 } |
212 | 209 |
213 SkPdfStream ToUnicode() const { | 210 SkPdfStream* ToUnicode() const { |
214 SkPdfStream ret; | 211 SkPdfStream* ret; |
215 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode
", "", &ret)) return ret; | 212 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode
", "", &ret)) return ret; |
216 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 213 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
217 return SkPdfStream(); | 214 return NULL; |
218 } | 215 } |
219 | 216 |
220 }; | 217 }; |
221 | 218 |
222 #endif // __DEFINED__SkPdfType1FontDictionary | 219 #endif // __DEFINED__SkPdfType1FontDictionary |
OLD | NEW |