| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithToUnicode( | 126 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithToUnicode( |
| 127 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount); | 127 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount); |
| 128 | 128 |
| 129 /** 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 |
| 130 * subset. | 130 * subset. |
| 131 * @param usage Glyph subset requested. | 131 * @param usage Glyph subset requested. |
| 132 * @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 |
| 133 * of SkPDFFont otherwise. | 133 * of SkPDFFont otherwise. |
| 134 */ | 134 */ |
| 135 virtual SkPDFFont* getFontSubset(const SkPDFGlyphSet* usage); | 135 virtual sk_sp<SkPDFObject> getFontSubset(const SkPDFGlyphSet* usage); |
| 136 | 136 |
| 137 enum Match { | 137 enum Match { |
| 138 kExact_Match, | 138 kExact_Match, |
| 139 kRelated_Match, | 139 kRelated_Match, |
| 140 kNot_Match, | 140 kNot_Match, |
| 141 }; | 141 }; |
| 142 static Match IsMatch(SkPDFFont* existingFont, | 142 static Match IsMatch(SkPDFFont* existingFont, |
| 143 uint32_t existingFontID, | 143 uint32_t existingFontID, |
| 144 uint16_t existingGlyphID, | 144 uint16_t existingGlyphID, |
| 145 uint32_t searchFontID, | 145 uint32_t searchFontID, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 uint16_t fLastGlyphID; | 200 uint16_t fLastGlyphID; |
| 201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; | 201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; |
| 202 sk_sp<SkPDFDict> fDescriptor; | 202 sk_sp<SkPDFDict> fDescriptor; |
| 203 | 203 |
| 204 SkAdvancedTypefaceMetrics::FontType fFontType; | 204 SkAdvancedTypefaceMetrics::FontType fFontType; |
| 205 | 205 |
| 206 typedef SkPDFDict INHERITED; | 206 typedef SkPDFDict INHERITED; |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 #endif | 209 #endif |
| OLD | NEW |