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

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

Issue 728873002: Enforce pure virtual behavior for onMatchFamilyStyleCharacter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add missing impl Created 6 years, 1 month 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 | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_win_dw.cpp » ('j') | 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 "SkAdvancedTypefaceMetrics.h" 9 #include "SkAdvancedTypefaceMetrics.h"
10 #include "SkBase64.h" 10 #include "SkBase64.h"
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 return SkNEW_ARGS(SkFontStyleSetGDI, (lf.lfFaceName)); 2487 return SkNEW_ARGS(SkFontStyleSetGDI, (lf.lfFaceName));
2488 } 2488 }
2489 2489
2490 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], 2490 virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
2491 const SkFontStyle& fontstyle) const S K_OVERRIDE { 2491 const SkFontStyle& fontstyle) const S K_OVERRIDE {
2492 // could be in base impl 2492 // could be in base impl
2493 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); 2493 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName));
2494 return sset->matchStyle(fontstyle); 2494 return sset->matchStyle(fontstyle);
2495 } 2495 }
2496 2496
2497 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con st SkFontStyle&,
2498 const char* bcp47[], int bcp 47Count,
2499 SkUnichar character) const S K_OVERRIDE {
2500 return NULL;
2501 }
2502
2497 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, 2503 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember,
2498 const SkFontStyle& fontstyle) const SK_ OVERRIDE { 2504 const SkFontStyle& fontstyle) const SK_ OVERRIDE {
2499 // could be in base impl 2505 // could be in base impl
2500 SkString familyName; 2506 SkString familyName;
2501 ((LogFontTypeface*)familyMember)->getFamilyName(&familyName); 2507 ((LogFontTypeface*)familyMember)->getFamilyName(&familyName);
2502 return this->matchFamilyStyle(familyName.c_str(), fontstyle); 2508 return this->matchFamilyStyle(familyName.c_str(), fontstyle);
2503 } 2509 }
2504 2510
2505 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE { 2511 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
2506 return create_from_stream(stream); 2512 return create_from_stream(stream);
(...skipping 28 matching lines...) Expand all
2535 2541
2536 private: 2542 private:
2537 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2543 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2538 }; 2544 };
2539 2545
2540 /////////////////////////////////////////////////////////////////////////////// 2546 ///////////////////////////////////////////////////////////////////////////////
2541 2547
2542 SkFontMgr* SkFontMgr_New_GDI() { 2548 SkFontMgr* SkFontMgr_New_GDI() {
2543 return SkNEW(SkFontMgrGDI); 2549 return SkNEW(SkFontMgrGDI);
2544 } 2550 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698