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