OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 #include "SkFontHost.h" | 8 #include "SkFontHost.h" |
9 #include "SkFontHost_FreeType_common.h" | 9 #include "SkFontHost_FreeType_common.h" |
10 #include "SkFontDescriptor.h" | 10 #include "SkFontDescriptor.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 return NULL; | 241 return NULL; |
242 } | 242 } |
243 | 243 |
244 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], | 244 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], |
245 const SkFontStyle& fontStyle) const S
K_OVERRIDE | 245 const SkFontStyle& fontStyle) const S
K_OVERRIDE |
246 { | 246 { |
247 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); | 247 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); |
248 return sset->matchStyle(fontStyle); | 248 return sset->matchStyle(fontStyle); |
249 } | 249 } |
250 | 250 |
| 251 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con
st SkFontStyle&, |
| 252 const char* bcp47[], int bcp
47Count, |
| 253 SkUnichar character) const S
K_OVERRIDE |
| 254 { |
| 255 return NULL; |
| 256 } |
| 257 |
251 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, | 258 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, |
252 const SkFontStyle& fontStyle) const SK_
OVERRIDE | 259 const SkFontStyle& fontStyle) const SK_
OVERRIDE |
253 { | 260 { |
254 for (int i = 0; i < fFamilies.count(); ++i) { | 261 for (int i = 0; i < fFamilies.count(); ++i) { |
255 for (int j = 0; j < fFamilies[i]->fStyles.count(); ++j) { | 262 for (int j = 0; j < fFamilies[i]->fStyles.count(); ++j) { |
256 if (fFamilies[i]->fStyles[j] == familyMember) { | 263 if (fFamilies[i]->fStyles[j] == familyMember) { |
257 return fFamilies[i]->matchStyle(fontStyle); | 264 return fFamilies[i]->matchStyle(fontStyle); |
258 } | 265 } |
259 } | 266 } |
260 } | 267 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 417 |
411 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies; | 418 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies; |
412 SkFontStyleSet_Custom* gDefaultFamily; | 419 SkFontStyleSet_Custom* gDefaultFamily; |
413 SkTypeface* gDefaultNormal; | 420 SkTypeface* gDefaultNormal; |
414 SkTypeface_FreeType::Scanner fScanner; | 421 SkTypeface_FreeType::Scanner fScanner; |
415 }; | 422 }; |
416 | 423 |
417 SkFontMgr* SkFontMgr::Factory() { | 424 SkFontMgr* SkFontMgr::Factory() { |
418 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX); | 425 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX); |
419 } | 426 } |
OLD | NEW |