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

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

Issue 670243002: Update fontMgr to take list of bcp47 language tags. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « include/ports/SkFontMgr_indirect.h ('k') | src/core/SkFontHost.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 2014 Google Inc. 2 * Copyright 2014 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 SkRemotableFontMgr_DEFINED 8 #ifndef SkRemotableFontMgr_DEFINED
9 #define SkRemotableFontMgr_DEFINED 9 #define SkRemotableFontMgr_DEFINED
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 /** 127 /**
128 * Use the system fall-back to find a font for the given character. 128 * Use the system fall-back to find a font for the given character.
129 * If no font can be found for the character, the return value's data id 129 * If no font can be found for the character, the return value's data id
130 * will be kInvalidDataId. 130 * will be kInvalidDataId.
131 * If the name is NULL, the match will start against any default fonts. 131 * If the name is NULL, the match will start against any default fonts.
132 * If the bpc47 is NULL, a default locale will be assumed. 132 * If the bpc47 is NULL, a default locale will be assumed.
133 * 133 *
134 * Note that bpc47 is a combination of ISO 639, 15924, and 3166-1 codes, 134 * Note that bpc47 is a combination of ISO 639, 15924, and 3166-1 codes,
135 * so it is fine to just pass a ISO 639 here. 135 * so it is fine to just pass a ISO 639 here.
136 */ 136 */
137 #ifdef SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER
137 virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], cons t SkFontStyle&, 138 virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], cons t SkFontStyle&,
138 const char bpc47[], SkUnichar character) const=0; 139 const char* bcp47[], int bcp4 7Count,
140 SkUnichar character) const=0;
141 #else
142 virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], cons t SkFontStyle&,
143 const char bcp47[], SkUnichar character) const=0;
144 #endif
139 145
140 /** 146 /**
141 * Returns the data for the given data id. 147 * Returns the data for the given data id.
142 * Will return NULL if the data id is invalid. 148 * Will return NULL if the data id is invalid.
143 * Note that this is a data id, not a font id. 149 * Note that this is a data id, not a font id.
144 * 150 *
145 * The caller must unref() the returned object. 151 * The caller must unref() the returned object.
146 */ 152 */
147 virtual SkStreamAsset* getData(int dataId) const = 0; 153 virtual SkStreamAsset* getData(int dataId) const = 0;
148 154
149 private: 155 private:
150 typedef SkRefCnt INHERITED; 156 typedef SkRefCnt INHERITED;
151 }; 157 };
152 158
153 #endif 159 #endif
OLDNEW
« no previous file with comments | « include/ports/SkFontMgr_indirect.h ('k') | src/core/SkFontHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698