1 /* 2 * Copyright 2013 Google Inc. 3 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkPdfType0FontDictionary_DEFINED 9 #define SkPdfType0FontDictionary_DEFINED 10 11 #include "SkPdfFontDictionary_autogen.h" 12 13 // Entries in a Type 0 font dictionary 14 class SkPdfType0FontDictionary : public SkPdfFontDictionary { 15 public: 16 public: asType0FontDictionary()17 SkPdfType0FontDictionary* asType0FontDictionary() {return this;} asType0FontDictionary()18 const SkPdfType0FontDictionary* asType0FontDictionary() const {return this;} 19 20 private: asType1FontDictionary()21 SkPdfType1FontDictionary* asType1FontDictionary() {return (SkPdfType1FontDictionary*)this;} asType1FontDictionary()22 const SkPdfType1FontDictionary* asType1FontDictionary() const {return (const SkPdfType1FontDictionary*)this;} 23 asMultiMasterFontDictionary()24 SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return (SkPdfMultiMasterFontDictionary*)this;} asMultiMasterFontDictionary()25 const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return (const SkPdfMultiMasterFontDictionary*)this;} 26 asTrueTypeFontDictionary()27 SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return (SkPdfTrueTypeFontDictionary*)this;} asTrueTypeFontDictionary()28 const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return (const SkPdfTrueTypeFontDictionary*)this;} 29 asType3FontDictionary()30 SkPdfType3FontDictionary* asType3FontDictionary() {return (SkPdfType3FontDictionary*)this;} asType3FontDictionary()31 const SkPdfType3FontDictionary* asType3FontDictionary() const {return (const SkPdfType3FontDictionary*)this;} 32 33 public: valid()34 bool valid() const {return true;} 35 SkString Type(SkPdfNativeDoc* doc); 36 bool has_Type() const; 37 SkString Subtype(SkPdfNativeDoc* doc); 38 bool has_Subtype() const; 39 SkString BaseFont(SkPdfNativeDoc* doc); 40 bool has_BaseFont() const; 41 42 bool isEncodingAName(SkPdfNativeDoc* doc); 43 SkString getEncodingAsName(SkPdfNativeDoc* doc); 44 45 bool isEncodingAStream(SkPdfNativeDoc* doc); 46 SkPdfStream* getEncodingAsStream(SkPdfNativeDoc* doc); 47 bool has_Encoding() const; 48 SkPdfArray* DescendantFonts(SkPdfNativeDoc* doc); 49 bool has_DescendantFonts() const; 50 SkPdfStream* ToUnicode(SkPdfNativeDoc* doc); 51 bool has_ToUnicode() const; 52 }; 53 54 #endif // SkPdfType0FontDictionary_DEFINED 55