OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef SkPDFFont_DEFINED | 9 #ifndef SkPDFFont_DEFINED |
10 #define SkPDFFont_DEFINED | 10 #define SkPDFFont_DEFINED |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 * responsibility to unreference it when done. This is needed to | 113 * responsibility to unreference it when done. This is needed to |
114 * accommodate the weak reference pattern used when the returned object | 114 * accommodate the weak reference pattern used when the returned object |
115 * is new and has no other references. | 115 * is new and has no other references. |
116 * @param typeface The typeface to find. | 116 * @param typeface The typeface to find. |
117 * @param glyphID Specify which section of a large font is of interest. | 117 * @param glyphID Specify which section of a large font is of interest. |
118 */ | 118 */ |
119 static SkPDFFont* GetFontResource(SkPDFCanon* canon, | 119 static SkPDFFont* GetFontResource(SkPDFCanon* canon, |
120 SkTypeface* typeface, | 120 SkTypeface* typeface, |
121 uint16_t glyphID); | 121 uint16_t glyphID); |
122 | 122 |
| 123 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithGlyphNames( |
| 124 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount); |
| 125 |
| 126 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithToUnicode( |
| 127 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount); |
| 128 |
123 /** Subset the font based on usage set. Returns a SkPDFFont instance with | 129 /** Subset the font based on usage set. Returns a SkPDFFont instance with |
124 * subset. | 130 * subset. |
125 * @param usage Glyph subset requested. | 131 * @param usage Glyph subset requested. |
126 * @return nullptr if font does not support subsetting, a new instanc
e | 132 * @return nullptr if font does not support subsetting, a new instanc
e |
127 * of SkPDFFont otherwise. | 133 * of SkPDFFont otherwise. |
128 */ | 134 */ |
129 virtual SkPDFFont* getFontSubset(const SkPDFGlyphSet* usage); | 135 virtual SkPDFFont* getFontSubset(const SkPDFGlyphSet* usage); |
130 | 136 |
131 enum Match { | 137 enum Match { |
132 kExact_Match, | 138 kExact_Match, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 uint16_t fLastGlyphID; | 200 uint16_t fLastGlyphID; |
195 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; | 201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; |
196 sk_sp<SkPDFDict> fDescriptor; | 202 sk_sp<SkPDFDict> fDescriptor; |
197 | 203 |
198 SkAdvancedTypefaceMetrics::FontType fFontType; | 204 SkAdvancedTypefaceMetrics::FontType fFontType; |
199 | 205 |
200 typedef SkPDFDict INHERITED; | 206 typedef SkPDFDict INHERITED; |
201 }; | 207 }; |
202 | 208 |
203 #endif | 209 #endif |
OLD | NEW |