1cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com/*
2cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * Copyright 2013 Google Inc.
3cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com
4cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * Use of this source code is governed by a BSD-style license that can be
5cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * found in the LICENSE file.
6cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com */
7cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com
8cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com#ifndef SkPdfType0FontDictionary_DEFINED
9cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com#define SkPdfType0FontDictionary_DEFINED
108cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
118cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com#include "SkPdfFontDictionary_autogen.h"
128cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
138cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com// Entries in a Type 0 font dictionary
148cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comclass SkPdfType0FontDictionary : public SkPdfFontDictionary {
158cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.compublic:
168cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.compublic:
178cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   SkPdfType0FontDictionary* asType0FontDictionary() {return this;}
188cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   const SkPdfType0FontDictionary* asType0FontDictionary() const {return this;}
198cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
208cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comprivate:
218cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   SkPdfType1FontDictionary* asType1FontDictionary() {return (SkPdfType1FontDictionary*)this;}
228cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   const SkPdfType1FontDictionary* asType1FontDictionary() const {return (const SkPdfType1FontDictionary*)this;}
238cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
248cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return (SkPdfMultiMasterFontDictionary*)this;}
258cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return (const SkPdfMultiMasterFontDictionary*)this;}
268cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
278cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return (SkPdfTrueTypeFontDictionary*)this;}
288cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return (const SkPdfTrueTypeFontDictionary*)this;}
298cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
308cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   SkPdfType3FontDictionary* asType3FontDictionary() {return (SkPdfType3FontDictionary*)this;}
318cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   const SkPdfType3FontDictionary* asType3FontDictionary() const {return (const SkPdfType3FontDictionary*)this;}
328cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
338cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.compublic:
348cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com   bool valid() const {return true;}
358cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkString Type(SkPdfNativeDoc* doc);
368cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_Type() const;
378cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkString Subtype(SkPdfNativeDoc* doc);
388cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_Subtype() const;
398cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkString BaseFont(SkPdfNativeDoc* doc);
408cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_BaseFont() const;
41cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com
428cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool isEncodingAName(SkPdfNativeDoc* doc);
438cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkString getEncodingAsName(SkPdfNativeDoc* doc);
44cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com
458cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool isEncodingAStream(SkPdfNativeDoc* doc);
468cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkPdfStream* getEncodingAsStream(SkPdfNativeDoc* doc);
478cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_Encoding() const;
488cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkPdfArray* DescendantFonts(SkPdfNativeDoc* doc);
498cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_DescendantFonts() const;
508cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  SkPdfStream* ToUnicode(SkPdfNativeDoc* doc);
518cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com  bool has_ToUnicode() const;
528cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com};
538cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com
54cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com#endif  // SkPdfType0FontDictionary_DEFINED
55