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 #include "SkTypes.h" // Keep this before any #ifdef ... | 9 #include "SkTypes.h" // Keep this before any #ifdef ... |
10 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 10 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 } | 2332 } |
2333 return CreateSet(this->stringAt(index)); | 2333 return CreateSet(this->stringAt(index)); |
2334 } | 2334 } |
2335 | 2335 |
2336 SkFontStyleSet* onMatchFamily(const char familyName[]) const override { | 2336 SkFontStyleSet* onMatchFamily(const char familyName[]) const override { |
2337 AutoCFRelease<CFStringRef> cfName(make_CFString(familyName)); | 2337 AutoCFRelease<CFStringRef> cfName(make_CFString(familyName)); |
2338 return CreateSet(cfName); | 2338 return CreateSet(cfName); |
2339 } | 2339 } |
2340 | 2340 |
2341 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], | 2341 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], |
2342 const SkFontStyle&) const override { | 2342 const SkFontStyle& fontStyle) const o
verride { |
2343 return nullptr; | 2343 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); |
| 2344 return sset->matchStyle(fontStyle); |
2344 } | 2345 } |
2345 | 2346 |
2346 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con
st SkFontStyle&, | 2347 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con
st SkFontStyle&, |
2347 const char* bcp47[], int bcp
47Count, | 2348 const char* bcp47[], int bcp
47Count, |
2348 SkUnichar character) const o
verride { | 2349 SkUnichar character) const o
verride { |
2349 return nullptr; | 2350 return nullptr; |
2350 } | 2351 } |
2351 | 2352 |
2352 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, | 2353 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, |
2353 const SkFontStyle&) const override { | 2354 const SkFontStyle&) const override { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 } | 2488 } |
2488 return face; | 2489 return face; |
2489 } | 2490 } |
2490 }; | 2491 }; |
2491 | 2492 |
2492 /////////////////////////////////////////////////////////////////////////////// | 2493 /////////////////////////////////////////////////////////////////////////////// |
2493 | 2494 |
2494 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; } | 2495 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; } |
2495 | 2496 |
2496 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 2497 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
OLD | NEW |