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(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface); | 31 SkPDFType0Font(SkPDFCanon* canon, |
| 32 const SkAdvancedTypefaceMetrics* info, |
| 33 SkTypeface* typeface); |
32 | 34 |
33 bool populate(const SkPDFGlyphSet* subset); | 35 bool populate(const SkPDFGlyphSet* subset); |
34 }; | 36 }; |
35 | 37 |
36 class SkPDFCIDFont : public SkPDFFont { | 38 class SkPDFCIDFont : public SkPDFFont { |
37 public: | 39 public: |
38 virtual ~SkPDFCIDFont(); | 40 virtual ~SkPDFCIDFont(); |
39 virtual bool multiByteGlyphs() const { return true; } | 41 virtual bool multiByteGlyphs() const { return true; } |
40 | 42 |
41 private: | 43 private: |
42 friend class SkPDFType0Font; // to access the constructor | 44 friend class SkPDFType0Font; // to access the constructor |
43 | 45 |
44 SkPDFCIDFont(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface, | 46 SkPDFCIDFont(SkPDFCanon* canon, |
| 47 const SkAdvancedTypefaceMetrics* info, |
| 48 SkTypeface* typeface, |
45 const SkPDFGlyphSet* subset); | 49 const SkPDFGlyphSet* subset); |
46 | 50 |
47 bool populate(const SkPDFGlyphSet* subset); | 51 bool populate(const SkPDFGlyphSet* subset); |
48 bool addFontDescriptor(int16_t defaultWidth, | 52 bool addFontDescriptor(int16_t defaultWidth, |
49 const SkTDArray<uint32_t>* subset); | 53 const SkTDArray<uint32_t>* subset); |
50 }; | 54 }; |
51 | 55 |
52 class SkPDFType1Font : public SkPDFFont { | 56 class SkPDFType1Font : public SkPDFFont { |
53 public: | 57 public: |
54 virtual ~SkPDFType1Font(); | 58 virtual ~SkPDFType1Font(); |
55 virtual bool multiByteGlyphs() const { return false; } | 59 virtual bool multiByteGlyphs() const { return false; } |
56 | 60 |
57 private: | 61 private: |
58 friend class SkPDFFont; // to access the constructor | 62 friend class SkPDFFont; // to access the constructor |
59 | 63 |
60 SkPDFType1Font(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface, | 64 SkPDFType1Font(SkPDFCanon* canon, |
61 uint16_t glyphID, SkPDFDict* relatedFontDescriptor); | 65 const SkAdvancedTypefaceMetrics* info, |
| 66 SkTypeface* typeface, |
| 67 uint16_t glyphID, |
| 68 SkPDFDict* relatedFontDescriptor); |
62 | 69 |
63 bool populate(int16_t glyphID); | 70 bool populate(int16_t glyphID); |
64 bool addFontDescriptor(int16_t defaultWidth); | 71 bool addFontDescriptor(int16_t defaultWidth); |
65 void addWidthInfoFromRange(int16_t defaultWidth, | 72 void addWidthInfoFromRange(int16_t defaultWidth, |
66 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); | 73 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); |
67 }; | 74 }; |
68 | 75 |
69 class SkPDFType3Font : public SkPDFFont { | 76 class SkPDFType3Font : public SkPDFFont { |
70 public: | 77 public: |
71 virtual ~SkPDFType3Font(); | 78 virtual ~SkPDFType3Font(); |
72 virtual bool multiByteGlyphs() const { return false; } | 79 virtual bool multiByteGlyphs() const { return false; } |
73 | 80 |
74 private: | 81 private: |
75 friend class SkPDFFont; // to access the constructor | 82 friend class SkPDFFont; // to access the constructor |
76 | 83 |
77 SkPDFType3Font(const SkAdvancedTypefaceMetrics* info, | 84 SkPDFType3Font(SkPDFCanon* canon, |
78 SkTypeface* typeface, uint16_t glyphID); | 85 const SkAdvancedTypefaceMetrics* info, |
| 86 SkTypeface* typeface, |
| 87 uint16_t glyphID); |
79 | 88 |
80 bool populate(uint16_t glyphID); | 89 bool populate(uint16_t glyphID); |
81 }; | 90 }; |
82 | 91 |
83 #endif | 92 #endif |
OLD | NEW |