| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 SkTypeface_DEFINED | 10 #ifndef SkTypeface_DEFINED |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 kUTF8_Encoding, | 153 kUTF8_Encoding, |
| 154 kUTF16_Encoding, | 154 kUTF16_Encoding, |
| 155 kUTF32_Encoding | 155 kUTF32_Encoding |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 /** | 158 /** |
| 159 * Given an array of character codes, of the specified encoding, | 159 * Given an array of character codes, of the specified encoding, |
| 160 * optionally return their corresponding glyph IDs (if glyphs is not NULL). | 160 * optionally return their corresponding glyph IDs (if glyphs is not NULL). |
| 161 * | 161 * |
| 162 * @param chars pointer to the array of character codes | 162 * @param chars pointer to the array of character codes |
| 163 * @param encoding how the characteds are encoded | 163 * @param encoding how the characters are encoded |
| 164 * @param glyphs (optional) returns the corresponding glyph IDs for each | 164 * @param glyphs (optional) returns the corresponding glyph IDs for each |
| 165 * character code, up to glyphCount values. If a character code is | 165 * character code, up to glyphCount values. If a character code is |
| 166 * not found in the typeface, the corresponding glyph ID will be 0. | 166 * not found in the typeface, the corresponding glyph ID will be 0. |
| 167 * @param glyphCount number of code points in 'chars' to process. If glyphs | 167 * @param glyphCount number of code points in 'chars' to process. If glyphs |
| 168 * is not NULL, then it must point sufficient memory to write | 168 * is not NULL, then it must point sufficient memory to write |
| 169 * glyphCount values into it. | 169 * glyphCount values into it. |
| 170 * @return the number of number of continuous non-zero glyph IDs computed | 170 * @return the number of number of continuous non-zero glyph IDs computed |
| 171 * from the beginning of chars. This value is valid, even if the | 171 * from the beginning of chars. This value is valid, even if the |
| 172 * glyphs parameter is NULL. | 172 * glyphs parameter is NULL. |
| 173 */ | 173 */ |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const =
0; | 300 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const =
0; |
| 301 virtual void onFilterRec(SkScalerContextRec*) const = 0; | 301 virtual void onFilterRec(SkScalerContextRec*) const = 0; |
| 302 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( | 302 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( |
| 303 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, | 303 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, |
| 304 const uint32_t* glyphIDs, | 304 const uint32_t* glyphIDs, |
| 305 uint32_t glyphIDsCount) const = 0; | 305 uint32_t glyphIDsCount) const = 0; |
| 306 virtual SkStream* onOpenStream(int* ttcIndex) const = 0; | 306 virtual SkStream* onOpenStream(int* ttcIndex) const = 0; |
| 307 virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const = 0
; | 307 virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const = 0
; |
| 308 | 308 |
| 309 virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], | 309 virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], |
| 310 int glyphCount) const; | 310 int glyphCount) const = 0; |
| 311 virtual int onCountGlyphs() const = 0; | 311 virtual int onCountGlyphs() const = 0; |
| 312 | 312 |
| 313 virtual int onGetUPEM() const = 0; | 313 virtual int onGetUPEM() const = 0; |
| 314 | 314 |
| 315 virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0; | 315 virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0; |
| 316 | 316 |
| 317 virtual int onGetTableTags(SkFontTableTag tags[]) const = 0; | 317 virtual int onGetTableTags(SkFontTableTag tags[]) const = 0; |
| 318 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 318 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
| 319 size_t length, void* data) const = 0; | 319 size_t length, void* data) const = 0; |
| 320 | 320 |
| 321 virtual SkTypeface* onRefMatchingStyle(Style styleBits) const = 0; | 321 virtual SkTypeface* onRefMatchingStyle(Style styleBits) const = 0; |
| 322 | 322 |
| 323 private: | 323 private: |
| 324 SkFontID fUniqueID; | 324 SkFontID fUniqueID; |
| 325 Style fStyle; | 325 Style fStyle; |
| 326 bool fIsFixedPitch; | 326 bool fIsFixedPitch; |
| 327 | 327 |
| 328 friend class SkPaint; | 328 friend class SkPaint; |
| 329 friend class SkGlyphCache; // GetDefaultTypeface | 329 friend class SkGlyphCache; // GetDefaultTypeface |
| 330 // just so deprecated fonthost can call protected methods | 330 // just so deprecated fonthost can call protected methods |
| 331 friend class SkFontHost; | 331 friend class SkFontHost; |
| 332 | 332 |
| 333 typedef SkWeakRefCnt INHERITED; | 333 typedef SkWeakRefCnt INHERITED; |
| 334 }; | 334 }; |
| 335 | 335 |
| 336 #endif | 336 #endif |
| OLD | NEW |