OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkFontMgr_DEFINED | 8 #ifndef SkFontMgr_DEFINED |
9 #define SkFontMgr_DEFINED | 9 #define SkFontMgr_DEFINED |
10 | 10 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 const char* bcp47[], int bcp
47Count, | 185 const char* bcp47[], int bcp
47Count, |
186 SkUnichar character) const =
0; | 186 SkUnichar character) const =
0; |
187 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, | 187 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |
188 const SkFontStyle&) const = 0; | 188 const SkFontStyle&) const = 0; |
189 | 189 |
190 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const = 0; | 190 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const = 0; |
191 virtual SkTypeface* onCreateFromStream(SkStreamAsset*, int ttcIndex) const =
0; | 191 virtual SkTypeface* onCreateFromStream(SkStreamAsset*, int ttcIndex) const =
0; |
192 // TODO: make pure virtual. | 192 // TODO: make pure virtual. |
193 virtual SkTypeface* onCreateFromStream(SkStreamAsset*, const FontParameters&
) const; | 193 virtual SkTypeface* onCreateFromStream(SkStreamAsset*, const FontParameters&
) const; |
194 virtual SkTypeface* onCreateFromFontData(std::unique_ptr<SkFontData>) const; | 194 virtual SkTypeface* onCreateFromFontData(std::unique_ptr<SkFontData>) const; |
195 #ifdef SK_DECLARE_LEGACY_CREATE_FROM_FONTDATA | |
196 virtual SkTypeface* onCreateFromFontData(SkFontData*) const { return nullptr
; }; | |
197 #endif | |
198 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const
= 0; | 195 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const
= 0; |
199 | 196 |
200 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontSt
yle) const = 0; | 197 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontSt
yle) const = 0; |
201 | 198 |
202 private: | 199 private: |
203 static SkFontMgr* Factory(); // implemented by porting layer | 200 static SkFontMgr* Factory(); // implemented by porting layer |
204 | 201 |
205 typedef SkRefCnt INHERITED; | 202 typedef SkRefCnt INHERITED; |
206 }; | 203 }; |
207 | 204 |
208 #endif | 205 #endif |
OLD | NEW |