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 SkPdfType3FontDictionary_DEFINED
9 #define SkPdfType3FontDictionary_DEFINED
10 
11 #include "SkPdfType1FontDictionary_autogen.h"
12 
13 // Entries in a Type 3 font dictionary
14 class SkPdfType3FontDictionary : public SkPdfType1FontDictionary {
15 public:
16 public:
asType3FontDictionary()17    SkPdfType3FontDictionary* asType3FontDictionary() {return this;}
asType3FontDictionary()18    const SkPdfType3FontDictionary* asType3FontDictionary() const {return this;}
19 
20 private:
asMultiMasterFontDictionary()21    SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return (SkPdfMultiMasterFontDictionary*)this;}
asMultiMasterFontDictionary()22    const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return (const SkPdfMultiMasterFontDictionary*)this;}
23 
asTrueTypeFontDictionary()24    SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return (SkPdfTrueTypeFontDictionary*)this;}
asTrueTypeFontDictionary()25    const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return (const SkPdfTrueTypeFontDictionary*)this;}
26 
27 public:
valid()28    bool valid() const {return true;}
29   SkString Type(SkPdfNativeDoc* doc);
30   bool has_Type() const;
31   SkString Subtype(SkPdfNativeDoc* doc);
32   bool has_Subtype() const;
33   SkString Name(SkPdfNativeDoc* doc);
34   bool has_Name() const;
35   SkRect FontBBox(SkPdfNativeDoc* doc);
36   bool has_FontBBox() const;
37   SkMatrix FontMatrix(SkPdfNativeDoc* doc);
38   bool has_FontMatrix() const;
39   SkPdfDictionary* CharProcs(SkPdfNativeDoc* doc);
40   bool has_CharProcs() const;
41 
42   bool isEncodingAName(SkPdfNativeDoc* doc);
43   SkString getEncodingAsName(SkPdfNativeDoc* doc);
44 
45   bool isEncodingAEncodingdictionary(SkPdfNativeDoc* doc);
46   SkPdfEncodingDictionary* getEncodingAsEncodingdictionary(SkPdfNativeDoc* doc);
47   bool has_Encoding() const;
48   int64_t FirstChar(SkPdfNativeDoc* doc);
49   bool has_FirstChar() const;
50   int64_t LastChar(SkPdfNativeDoc* doc);
51   bool has_LastChar() const;
52   SkPdfArray* Widths(SkPdfNativeDoc* doc);
53   bool has_Widths() const;
54   SkPdfResourceDictionary* Resources(SkPdfNativeDoc* doc);
55   bool has_Resources() const;
56   SkPdfStream* ToUnicode(SkPdfNativeDoc* doc);
57   bool has_ToUnicode() const;
58 };
59 
60 #endif  // SkPdfType3FontDictionary_DEFINED
61