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

Side by Side Diff: include/ports/SkFontMgr.h

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 | « no previous file | src/fonts/SkFontMgr_fontconfig.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 * 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 protected: 114 protected:
115 virtual int onCountFamilies() const = 0; 115 virtual int onCountFamilies() const = 0;
116 virtual void onGetFamilyName(int index, SkString* familyName) const = 0; 116 virtual void onGetFamilyName(int index, SkString* familyName) const = 0;
117 virtual SkFontStyleSet* onCreateStyleSet(int index)const = 0; 117 virtual SkFontStyleSet* onCreateStyleSet(int index)const = 0;
118 118
119 /** May return NULL if the name is not found. */ 119 /** May return NULL if the name is not found. */
120 virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const = 0; 120 virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const = 0;
121 121
122 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], 122 virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
123 const SkFontStyle&) const = 0; 123 const SkFontStyle&) const = 0;
124 // TODO: pure virtual, implement on all impls.
125 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con st SkFontStyle&, 124 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con st SkFontStyle&,
126 const char* bcp47[], int bcp 47Count, 125 const char* bcp47[], int bcp 47Count,
127 SkUnichar character) const 126 SkUnichar character) const = 0;
128 { return NULL; }
129 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, 127 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*,
130 const SkFontStyle&) const = 0; 128 const SkFontStyle&) const = 0;
131 129
132 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const = 0; 130 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const = 0;
133 virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) const = 0; 131 virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) const = 0;
134 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const = 0; 132 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const = 0;
135 133
136 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], 134 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
137 unsigned styleBits) const = 0; 135 unsigned styleBits) const = 0;
138 private: 136 private:
139 static SkFontMgr* Factory(); // implemented by porting layer 137 static SkFontMgr* Factory(); // implemented by porting layer
140 friend SkFontMgr* sk_fontmgr_create_default(); 138 friend SkFontMgr* sk_fontmgr_create_default();
141 139
142 typedef SkRefCnt INHERITED; 140 typedef SkRefCnt INHERITED;
143 }; 141 };
144 142
145 #endif 143 #endif
OLDNEW
« no previous file with comments | « no previous file | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698