OLD | NEW |
1 #ifndef __DEFINED__SkPdfCIDFontDescriptorDictionary | 1 #ifndef __DEFINED__SkPdfCIDFontDescriptorDictionary |
2 #define __DEFINED__SkPdfCIDFontDescriptorDictionary | 2 #define __DEFINED__SkPdfCIDFontDescriptorDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Additional font descriptor entries for CIDFonts | 9 // Additional font descriptor entries for CIDFonts |
10 class SkPdfCIDFontDescriptorDictionary : public SkPdfDictionary { | 10 class SkPdfCIDFontDescriptorDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfCIDFontDescriptorDictionary& operator=(const SkPdfCIDFontDescriptorDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 526 SkPdfCIDFontDescriptorDictionary& operator=(const SkPdfCIDFontDescriptorDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
527 | 527 |
528 /** (Optional) A dictionary containing entries that describe the style of the gl
yphs in | 528 /** (Optional) A dictionary containing entries that describe the style of the gl
yphs in |
529 * the font (see "Style," above). | 529 * the font (see "Style," above). |
530 **/ | 530 **/ |
531 bool has_Style() const { | 531 bool has_Style() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style
", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style
", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 SkPdfDictionary* Style() const { | 535 SkPdfDictionary* Style() const; |
536 SkPdfDictionary* ret; | |
537 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style
", "", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return NULL; | |
540 } | |
541 | |
542 /** (Optional) A name specifying the language of the font, used for encodings wh
ere | 536 /** (Optional) A name specifying the language of the font, used for encodings wh
ere |
543 * the language is not implied by the encoding itself. The possible values are
the | 537 * the language is not implied by the encoding itself. The possible values are
the |
544 * 2-character language codes defined by ISO 639-for example, en for English an
d ja | 538 * 2-character language codes defined by ISO 639-for example, en for English an
d ja |
545 * for Japanese. The complete list of these codes be obtained from the Internat
ional | 539 * for Japanese. The complete list of these codes be obtained from the Internat
ional |
546 * Organization for Standardization (see the Bibliography). | 540 * Organization for Standardization (see the Bibliography). |
547 **/ | 541 **/ |
548 bool has_Lang() const { | 542 bool has_Lang() const { |
549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang"
, "", NULL)); | 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang"
, "", NULL)); |
550 } | 544 } |
551 | 545 |
552 std::string Lang() const { | 546 std::string Lang() const; |
553 std::string ret; | |
554 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "",
&ret)) return ret; | |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
556 return ""; | |
557 } | |
558 | |
559 /** (Optional) A dictionary whose keys identify a class of characters in a CIDFo
nt. | 547 /** (Optional) A dictionary whose keys identify a class of characters in a CIDFo
nt. |
560 * Each value is a dictionary containing entries that override the correspondin
g | 548 * Each value is a dictionary containing entries that override the correspondin
g |
561 * values in the main font descriptor dictionary for that class of characters (
see "FD," | 549 * values in the main font descriptor dictionary for that class of characters (
see "FD," |
562 * below). | 550 * below). |
563 **/ | 551 **/ |
564 bool has_FD() const { | 552 bool has_FD() const { |
565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD",
"", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD",
"", NULL)); |
566 } | 554 } |
567 | 555 |
568 SkPdfDictionary* FD() const { | 556 SkPdfDictionary* FD() const; |
569 SkPdfDictionary* ret; | |
570 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD",
"", &ret)) return ret; | |
571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
572 return NULL; | |
573 } | |
574 | |
575 /** (Optional) A stream identifying which CIDs are present in the CIDFont file.
If this | 557 /** (Optional) A stream identifying which CIDs are present in the CIDFont file.
If this |
576 * entry is present, the CIDFont contains only a subset of the glyphs in the ch
aracter | 558 * entry is present, the CIDFont contains only a subset of the glyphs in the ch
aracter |
577 * collection defined by the CIDSystemInfo dictionary. If it is absent, the onl
y indica- | 559 * collection defined by the CIDSystemInfo dictionary. If it is absent, the onl
y indica- |
578 * tion of a CIDFont subset is the subset tag in the FontName entry (see Sectio
n 5.5.3, | 560 * tion of a CIDFont subset is the subset tag in the FontName entry (see Sectio
n 5.5.3, |
579 * "Font Subsets"). | 561 * "Font Subsets"). |
580 * The stream's data is organized as a table of bits indexed by CID. The bits s
hould be | 562 * The stream's data is organized as a table of bits indexed by CID. The bits s
hould be |
581 * stored in bytes with the high-order bit first. Each bit corresponds to a CID
. The first | 563 * stored in bytes with the high-order bit first. Each bit corresponds to a CID
. The first |
582 * bit of the first byte corresponds to CID 0, the next bit to CID 1, and so on
. | 564 * bit of the first byte corresponds to CID 0, the next bit to CID 1, and so on
. |
583 **/ | 565 **/ |
584 bool has_CIDSet() const { | 566 bool has_CIDSet() const { |
585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSe
t", "", NULL)); | 567 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSe
t", "", NULL)); |
586 } | 568 } |
587 | 569 |
588 SkPdfStream* CIDSet() const { | 570 SkPdfStream* CIDSet() const; |
589 SkPdfStream* ret; | |
590 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet",
"", &ret)) return ret; | |
591 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
592 return NULL; | |
593 } | |
594 | |
595 }; | 571 }; |
596 | 572 |
597 #endif // __DEFINED__SkPdfCIDFontDescriptorDictionary | 573 #endif // __DEFINED__SkPdfCIDFontDescriptorDictionary |
OLD | NEW |