| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfTrueTypeFontDictionary | 1 #ifndef __DEFINED__SkPdfTrueTypeFontDictionary |
| 2 #define __DEFINED__SkPdfTrueTypeFontDictionary | 2 #define __DEFINED__SkPdfTrueTypeFontDictionary |
| 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 "SkPdfType1FontDictionary_autogen.h" |
| 7 | 7 |
| 8 class SkPdfTrueTypeFontDictionary : public SkPdfFontDictionary { | 8 class SkPdfTrueTypeFontDictionary : public SkPdfType1FontDictionary { |
| 9 public: | 9 public: |
| 10 virtual SkPdfObjectType getType() const { return kTrueTypeFontDictionary_SkPdf
ObjectType;} | 10 virtual SkPdfObjectType getType() const { return kTrueTypeFontDictionary_SkPdf
ObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrueTyp
eFontDictionary_SkPdfObjectType + 1);} | 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrueTyp
eFontDictionary_SkPdfObjectType + 1);} |
| 12 public: | 12 public: |
| 13 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return this;} | 13 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return this;} |
| 14 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn this;} | 14 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn this;} |
| 15 | 15 |
| 16 private: | 16 private: |
| 17 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} | |
| 18 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} | |
| 19 | |
| 20 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} | |
| 21 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} | |
| 22 | |
| 23 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} | |
| 24 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} | |
| 25 | |
| 26 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} | 17 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} |
| 27 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} | 18 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} |
| 28 | 19 |
| 29 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} | |
| 30 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} | |
| 31 | |
| 32 public: | 20 public: |
| 33 private: | 21 private: |
| 34 public: | 22 public: |
| 35 SkPdfTrueTypeFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfFontDictionary(podofoDoc, podofoObj) {} | 23 SkPdfTrueTypeFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfType1FontDictionary(podofoDoc, podofoObj) {} |
| 36 | 24 |
| 37 virtual bool valid() const {return true;} | 25 virtual bool valid() const {return true;} |
| 38 | 26 |
| 39 SkPdfTrueTypeFontDictionary& operator=(const SkPdfTrueTypeFontDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 27 SkPdfTrueTypeFontDictionary& operator=(const SkPdfTrueTypeFontDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
| 40 | 28 |
| 29 bool has_Subtype() const { |
| 30 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
| 31 } |
| 32 |
| 33 std::string Subtype() const { |
| 34 std::string ret; |
| 35 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; |
| 36 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 37 return ""; |
| 38 } |
| 39 |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 #endif // __DEFINED__SkPdfTrueTypeFontDictionary | 42 #endif // __DEFINED__SkPdfTrueTypeFontDictionary |
| OLD | NEW |