Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: experimental/PdfViewer/SkPdfTrueTypeFontDictionary_autogen.h

Issue 17748002: Basic support for Type3 Fonts in Pdf + various refactorings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef __DEFINED__SkPdfTrueTypeFontDictionary
2 #define __DEFINED__SkPdfTrueTypeFontDictionary
3
4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfType1FontDictionary_autogen.h"
7
8 class SkPdfTrueTypeFontDictionary : public SkPdfType1FontDictionary {
9 public:
10 virtual SkPdfObjectType getType() const { return kTrueTypeFontDictionary_SkPdf ObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrueTyp eFontDictionary_SkPdfObjectType + 1);}
12 public:
13 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return this;}
14 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r eturn this;}
15
16 private:
17 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return NULL;}
18 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co nst {return NULL;}
19
20 public:
21 private:
22 public:
23 SkPdfTrueTypeFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO bject* podofoObj = NULL) : SkPdfType1FontDictionary(podofoDoc, podofoObj) {}
24
25 virtual bool valid() const {return true;}
26
27 SkPdfTrueTypeFontDictionary& operator=(const SkPdfTrueTypeFontDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;}
28
29 bool has_Subtype() const {
30 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
31 }
32
33 std::string Subtype() const {
34 std::string ret;
35 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret;
36 // TODO(edisonn): warn about missing required field, assert for known good p dfs
37 return "";
38 }
39
40 };
41
42 #endif // __DEFINED__SkPdfTrueTypeFontDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698