Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 1612653002: Implement onMatchFamilyStyle for Mac. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698