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

Unified Diff: experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (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 side-by-side diff with in-line comments
Download patch
Index: experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h
===================================================================
--- experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h (revision 9684)
+++ experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h (working copy)
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfFontDictionary_autogen.h"
+// Entries in a Type 0 font dictionary
class SkPdfType0FontDictionary : public SkPdfFontDictionary {
public:
virtual SkPdfObjectType getType() const { return kType0FontDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@
SkPdfType0FontDictionary& operator=(const SkPdfType0FontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Font for a font dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -45,6 +53,12 @@
return "";
}
+/** (Required) The type of font; must be Type0 for a Type 0 font.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -52,6 +66,20 @@
return "";
}
+/** (Required) The PostScript name of the font. In principle, this is an arbitrary
+ * name, since there is no font program associated directly with a Type 0 font
+ * dictionary. The conventions described here ensure maximum compatibility
+ * with existing Acrobat products.
+ * If the descendant is a Type 0 CIDFont, this name should be the concatenation
+ * of the CIDFont's BaseFont name, a hyphen, and the CMap name given in the
+ * Encoding entry (or the CMapName entry in the CMap program itself). If the
+ * descendant is a Type 2 CIDFont, this name should be the same as the
+ * CIDFont's BaseFont name.
+**/
+ bool has_BaseFont() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
+ }
+
std::string BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
@@ -59,6 +87,16 @@
return "";
}
+/** (Required) The name of a predefined CMap, or a stream containing a CMap
+ * program, that maps character codes to font numbers and CIDs. If the descen-
+ * dant is a Type 2 CIDFont whose associated TrueType font program is not em-
+ * bedded in the PDF file, the Encoding entry must be a predefined CMap name
+ * (see "Glyph Selection in CIDFonts" on page 339).
+**/
+ bool has_Encoding() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
+ }
+
bool isEncodingAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return false;
@@ -85,6 +123,17 @@
return SkPdfStream();
}
+/** (Required) An array specifying one or more fonts or CIDFonts that are
+ * descendants of this composite font. This array is indexed by the font number
+ * that is obtained by mapping a character code through the CMap specified in
+ * the Encoding entry.
+ * Note: In all PDF versions up to and including PDF 1.4, DescendantFonts must
+ * be a one-element array containing a CIDFont dictionary.
+**/
+ bool has_DescendantFonts() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DescendantFonts", "", NULL));
+ }
+
SkPdfArray DescendantFonts() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DescendantFonts", "", &ret)) return ret;
@@ -92,6 +141,13 @@
return SkPdfArray();
}
+/** (Optional) A stream containing a CMap file that maps character codes to
+ * Unicode values (see Section 5.9, "ToUnicode CMaps").
+**/
+ bool has_ToUnicode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", NULL));
+ }
+
SkPdfStream ToUnicode() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", &ret)) return ret;

Powered by Google App Engine
This is Rietveld 408576698