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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 protected: | 199 protected: |
200 /** uniqueID must be unique and non-zero | 200 /** uniqueID must be unique and non-zero |
201 */ | 201 */ |
202 SkTypeface(Style style, SkFontID uniqueID, bool isFixedWidth = false); | 202 SkTypeface(Style style, SkFontID uniqueID, bool isFixedWidth = false); |
203 virtual ~SkTypeface(); | 203 virtual ~SkTypeface(); |
204 | 204 |
205 friend class SkScalerContext; | 205 friend class SkScalerContext; |
206 static SkTypeface* GetDefaultTypeface(); | 206 static SkTypeface* GetDefaultTypeface(); |
207 | 207 |
| 208 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const =
0; |
| 209 virtual void onFilterRec(SkScalerContextRec*) const = 0; |
| 210 |
208 virtual int onGetUPEM() const; | 211 virtual int onGetUPEM() const; |
209 virtual int onGetTableTags(SkFontTableTag tags[]) const; | 212 virtual int onGetTableTags(SkFontTableTag tags[]) const; |
210 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 213 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
211 size_t length, void* data) const; | 214 size_t length, void* data) const; |
212 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const; | |
213 virtual void onFilterRec(SkScalerContextRec*) const; | |
214 virtual void onGetFontDescriptor(SkFontDescriptor*) const; | 215 virtual void onGetFontDescriptor(SkFontDescriptor*) const; |
215 | 216 |
216 private: | 217 private: |
217 SkFontID fUniqueID; | 218 SkFontID fUniqueID; |
218 Style fStyle; | 219 Style fStyle; |
219 bool fIsFixedWidth; | 220 bool fIsFixedWidth; |
220 | 221 |
221 friend class SkPaint; | 222 friend class SkPaint; |
222 friend class SkGlyphCache; // GetDefaultTypeface | 223 friend class SkGlyphCache; // GetDefaultTypeface |
223 // just so deprecated fonthost can call protected methods | 224 // just so deprecated fonthost can call protected methods |
224 friend class SkFontHost; | 225 friend class SkFontHost; |
225 | 226 |
226 typedef SkWeakRefCnt INHERITED; | 227 typedef SkWeakRefCnt INHERITED; |
227 }; | 228 }; |
228 | 229 |
229 #endif | 230 #endif |
OLD | NEW |