| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPDFFontImpl_DEFINED | 10 #ifndef SkPDFFontImpl_DEFINED |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog); | 21 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog); |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 friend class SkPDFFont; // to access the constructor | 25 friend class SkPDFFont; // to access the constructor |
| 26 #ifdef SK_DEBUG | 26 #ifdef SK_DEBUG |
| 27 bool fPopulated; | 27 bool fPopulated; |
| 28 typedef SkPDFDict INHERITED; | 28 typedef SkPDFDict INHERITED; |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 SkPDFType0Font(SkPDFCanon* canon, | 31 SkPDFType0Font(const SkAdvancedTypefaceMetrics* info, |
| 32 const SkAdvancedTypefaceMetrics* info, | |
| 33 SkTypeface* typeface); | 32 SkTypeface* typeface); |
| 34 | 33 |
| 35 bool populate(const SkPDFGlyphSet* subset); | 34 bool populate(const SkPDFGlyphSet* subset); |
| 36 }; | 35 }; |
| 37 | 36 |
| 38 class SkPDFCIDFont : public SkPDFFont { | 37 class SkPDFCIDFont : public SkPDFFont { |
| 39 public: | 38 public: |
| 40 virtual ~SkPDFCIDFont(); | 39 virtual ~SkPDFCIDFont(); |
| 41 virtual bool multiByteGlyphs() const { return true; } | 40 virtual bool multiByteGlyphs() const { return true; } |
| 42 | 41 |
| 43 private: | 42 private: |
| 44 friend class SkPDFType0Font; // to access the constructor | 43 friend class SkPDFType0Font; // to access the constructor |
| 45 | 44 |
| 46 SkPDFCIDFont(SkPDFCanon* canon, | 45 SkPDFCIDFont(const SkAdvancedTypefaceMetrics* info, |
| 47 const SkAdvancedTypefaceMetrics* info, | |
| 48 SkTypeface* typeface, | 46 SkTypeface* typeface, |
| 49 const SkPDFGlyphSet* subset); | 47 const SkPDFGlyphSet* subset); |
| 50 | 48 |
| 51 bool populate(const SkPDFGlyphSet* subset); | 49 bool populate(const SkPDFGlyphSet* subset); |
| 52 bool addFontDescriptor(int16_t defaultWidth, | 50 bool addFontDescriptor(int16_t defaultWidth, |
| 53 const SkTDArray<uint32_t>* subset); | 51 const SkTDArray<uint32_t>* subset); |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 class SkPDFType1Font : public SkPDFFont { | 54 class SkPDFType1Font : public SkPDFFont { |
| 57 public: | 55 public: |
| 58 virtual ~SkPDFType1Font(); | 56 virtual ~SkPDFType1Font(); |
| 59 virtual bool multiByteGlyphs() const { return false; } | 57 virtual bool multiByteGlyphs() const { return false; } |
| 60 | 58 |
| 61 private: | 59 private: |
| 62 friend class SkPDFFont; // to access the constructor | 60 friend class SkPDFFont; // to access the constructor |
| 63 | 61 |
| 64 SkPDFType1Font(SkPDFCanon* canon, | 62 SkPDFType1Font(const SkAdvancedTypefaceMetrics* info, |
| 65 const SkAdvancedTypefaceMetrics* info, | |
| 66 SkTypeface* typeface, | 63 SkTypeface* typeface, |
| 67 uint16_t glyphID, | 64 uint16_t glyphID, |
| 68 SkPDFDict* relatedFontDescriptor); | 65 SkPDFDict* relatedFontDescriptor); |
| 69 | 66 |
| 70 bool populate(int16_t glyphID); | 67 bool populate(int16_t glyphID); |
| 71 bool addFontDescriptor(int16_t defaultWidth); | 68 bool addFontDescriptor(int16_t defaultWidth); |
| 72 void addWidthInfoFromRange(int16_t defaultWidth, | 69 void addWidthInfoFromRange(int16_t defaultWidth, |
| 73 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); | 70 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); |
| 74 }; | 71 }; |
| 75 | 72 |
| 76 class SkPDFType3Font : public SkPDFFont { | 73 class SkPDFType3Font : public SkPDFFont { |
| 77 public: | 74 public: |
| 78 virtual ~SkPDFType3Font(); | 75 virtual ~SkPDFType3Font(); |
| 79 virtual bool multiByteGlyphs() const { return false; } | 76 virtual bool multiByteGlyphs() const { return false; } |
| 80 | 77 |
| 81 private: | 78 private: |
| 82 friend class SkPDFFont; // to access the constructor | 79 friend class SkPDFFont; // to access the constructor |
| 83 | 80 |
| 84 SkPDFType3Font(SkPDFCanon* canon, | 81 SkPDFType3Font(const SkAdvancedTypefaceMetrics* info, |
| 85 const SkAdvancedTypefaceMetrics* info, | |
| 86 SkTypeface* typeface, | 82 SkTypeface* typeface, |
| 87 uint16_t glyphID); | 83 uint16_t glyphID); |
| 88 | 84 |
| 89 bool populate(uint16_t glyphID); | 85 bool populate(uint16_t glyphID); |
| 90 }; | 86 }; |
| 91 | 87 |
| 92 #endif | 88 #endif |
| OLD | NEW |