OLD | NEW |
1 #ifndef __DEFINED__SkPdfFontDescriptorDictionary | 1 #ifndef __DEFINED__SkPdfFontDescriptorDictionary |
2 #define __DEFINED__SkPdfFontDescriptorDictionary | 2 #define __DEFINED__SkPdfFontDescriptorDictionary |
3 | 3 |
4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
7 | 7 |
8 // Entries common to all font descriptors | 8 // Entries common to all font descriptors |
9 class SkPdfFontDescriptorDictionary : public SkPdfDictionary { | 9 class SkPdfFontDescriptorDictionary : public SkPdfDictionary { |
10 public: | 10 public: |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return NULL;} | 156 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return NULL;} |
157 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {ret
urn NULL;} | 157 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {ret
urn NULL;} |
158 | 158 |
159 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;} | 159 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;} |
160 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;} | 160 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;} |
161 | 161 |
162 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} | 162 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} |
163 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} | 163 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} |
164 | 164 |
165 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} | |
166 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} | |
167 | |
168 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} | 165 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} |
169 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} | 166 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} |
170 | 167 |
| 168 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} |
| 169 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} |
| 170 |
171 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} | 171 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} |
172 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} | 172 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} |
173 | 173 |
174 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} | 174 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} |
175 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} | 175 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} |
176 | 176 |
177 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} | 177 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} |
178 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} | 178 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} |
179 | 179 |
180 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n NULL;} | 180 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n NULL;} |
181 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
const {return NULL;} | 181 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
const {return NULL;} |
182 | 182 |
183 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {r
eturn NULL;} | 183 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {r
eturn NULL;} |
184 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionar
y() const {return NULL;} | 184 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionar
y() const {return NULL;} |
185 | 185 |
186 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NU
LL;} | 186 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NU
LL;} |
187 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons
t {return NULL;} | 187 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons
t {return NULL;} |
188 | 188 |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 return 0; | 738 return 0; |
739 } | 739 } |
740 | 740 |
741 /** (Optional) A stream containing a Type 1 font program (see Section 5.8, | 741 /** (Optional) A stream containing a Type 1 font program (see Section 5.8, |
742 * "Embedded Font Programs"). | 742 * "Embedded Font Programs"). |
743 **/ | 743 **/ |
744 bool has_FontFile() const { | 744 bool has_FontFile() const { |
745 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile", "", NULL)); | 745 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile", "", NULL)); |
746 } | 746 } |
747 | 747 |
748 SkPdfStream FontFile() const { | 748 SkPdfStream* FontFile() const { |
749 SkPdfStream ret; | 749 SkPdfStream* ret; |
750 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile"
, "", &ret)) return ret; | 750 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile"
, "", &ret)) return ret; |
751 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 751 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
752 return SkPdfStream(); | 752 return NULL; |
753 } | 753 } |
754 | 754 |
755 /** (Optional; PDF 1.1) A stream containing a TrueType font program (see Sec- | 755 /** (Optional; PDF 1.1) A stream containing a TrueType font program (see Sec- |
756 * tion 5.8, "Embedded Font Programs"). | 756 * tion 5.8, "Embedded Font Programs"). |
757 **/ | 757 **/ |
758 bool has_FontFile2() const { | 758 bool has_FontFile2() const { |
759 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile2", "", NULL)); | 759 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile2", "", NULL)); |
760 } | 760 } |
761 | 761 |
762 SkPdfStream FontFile2() const { | 762 SkPdfStream* FontFile2() const { |
763 SkPdfStream ret; | 763 SkPdfStream* ret; |
764 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile2
", "", &ret)) return ret; | 764 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile2
", "", &ret)) return ret; |
765 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 765 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
766 return SkPdfStream(); | 766 return NULL; |
767 } | 767 } |
768 | 768 |
769 /** (Optional; PDF 1.2) A stream containing a font program other than Type 1 or | 769 /** (Optional; PDF 1.2) A stream containing a font program other than Type 1 or |
770 * TrueType. The format of the font program is specified by the Subtype entry | 770 * TrueType. The format of the font program is specified by the Subtype entry |
771 * in the stream dictionary (see Section 5.8, "Embedded Font Programs," and | 771 * in the stream dictionary (see Section 5.8, "Embedded Font Programs," and |
772 * implementation note 49 in Appendix H). | 772 * implementation note 49 in Appendix H). |
773 * At most, only one of the FontFile, FontFile2, and FontFile3 entries may be | 773 * At most, only one of the FontFile, FontFile2, and FontFile3 entries may be |
774 * present. | 774 * present. |
775 **/ | 775 **/ |
776 bool has_FontFile3() const { | 776 bool has_FontFile3() const { |
777 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile3", "", NULL)); | 777 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
ile3", "", NULL)); |
778 } | 778 } |
779 | 779 |
780 SkPdfStream FontFile3() const { | 780 SkPdfStream* FontFile3() const { |
781 SkPdfStream ret; | 781 SkPdfStream* ret; |
782 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile3
", "", &ret)) return ret; | 782 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile3
", "", &ret)) return ret; |
783 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 783 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
784 return SkPdfStream(); | 784 return NULL; |
785 } | 785 } |
786 | 786 |
787 /** (Optional; meaningful only in Type 1 fonts; PDF 1.1) A string listing the ch
ar- | 787 /** (Optional; meaningful only in Type 1 fonts; PDF 1.1) A string listing the ch
ar- |
788 * acter names defined in a font subset. The names in this string must be in PD
F | 788 * acter names defined in a font subset. The names in this string must be in PD
F |
789 * syntax-that is, each name preceded by a slash (/). The names can appear in | 789 * syntax-that is, each name preceded by a slash (/). The names can appear in |
790 * any order. The name .notdef should be omitted; it is assumed to exist in the | 790 * any order. The name .notdef should be omitted; it is assumed to exist in the |
791 * font subset. If this entry is absent, the only indication of a font subset i
s the | 791 * font subset. If this entry is absent, the only indication of a font subset i
s the |
792 * subset tag in the FontName entry (see Section 5.5.3, "Font Subsets"). | 792 * subset tag in the FontName entry (see Section 5.5.3, "Font Subsets"). |
793 **/ | 793 **/ |
794 bool has_CharSet() const { | 794 bool has_CharSet() const { |
795 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharS
et", "", NULL)); | 795 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharS
et", "", NULL)); |
796 } | 796 } |
797 | 797 |
798 std::string CharSet() const { | 798 std::string CharSet() const { |
799 std::string ret; | 799 std::string ret; |
800 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharSet",
"", &ret)) return ret; | 800 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharSet",
"", &ret)) return ret; |
801 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 801 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
802 return ""; | 802 return ""; |
803 } | 803 } |
804 | 804 |
805 }; | 805 }; |
806 | 806 |
807 #endif // __DEFINED__SkPdfFontDescriptorDictionary | 807 #endif // __DEFINED__SkPdfFontDescriptorDictionary |
OLD | NEW |