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

Side by Side Diff: src/fonts/SkFontMgr_fontconfig.cpp

Issue 1905253002: Implement matchFamilyStyle for SkFontMgr_fontconfig (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/core/SkTypeface.cpp ('k') | 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 * 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 #include "SkFontConfigInterface.h" 8 #include "SkFontConfigInterface.h"
9 #include "SkFontConfigTypeface.h" 9 #include "SkFontConfigTypeface.h"
10 #include "SkFontMgr.h" 10 #include "SkFontMgr.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 *trimmedMatches.append() = match[i]; 274 *trimmedMatches.append() = match[i];
275 } 275 }
276 } 276 }
277 277
278 SkFontStyleSet_FC* sset = 278 SkFontStyleSet_FC* sset =
279 new SkFontStyleSet_FC(trimmedMatches.begin(), trimmedMatches.cou nt()); 279 new SkFontStyleSet_FC(trimmedMatches.begin(), trimmedMatches.cou nt());
280 return sset; 280 return sset;
281 } 281 }
282 282
283 SkTypeface* onMatchFamilyStyle(const char familyName[], 283 SkTypeface* onMatchFamilyStyle(const char familyName[],
284 const SkFontStyle&) const override { return n ullptr; } 284 const SkFontStyle& style) const override {
285 FCLocker lock;
286 return FontConfigTypeface::LegacyCreateTypeface(familyName, style);
287 }
288
285 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFon tStyle&, 289 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFon tStyle&,
286 const char* bcp47[], int bcp47Count, 290 const char* bcp47[], int bcp47Count,
287 SkUnichar character) const override { 291 SkUnichar character) const override {
288 return nullptr; 292 return nullptr;
289 } 293 }
290 SkTypeface* onMatchFaceStyle(const SkTypeface*, 294 SkTypeface* onMatchFaceStyle(const SkTypeface*,
291 const SkFontStyle&) const override { return nul lptr; } 295 const SkFontStyle&) const override { return nul lptr; }
292 296
293 SkTypeface* onCreateFromData(SkData*, int ttcIndex) const override { return nullptr; } 297 SkTypeface* onCreateFromData(SkData*, int ttcIndex) const override { return nullptr; }
294 298
(...skipping 26 matching lines...) Expand all
321 SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontStyle styl e) const override { 325 SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontStyle styl e) const override {
322 FCLocker lock; 326 FCLocker lock;
323 return FontConfigTypeface::LegacyCreateTypeface(familyName, style); 327 return FontConfigTypeface::LegacyCreateTypeface(familyName, style);
324 } 328 }
325 }; 329 };
326 330
327 SkFontMgr* SkFontMgr::Factory() { 331 SkFontMgr* SkFontMgr::Factory() {
328 SkFontConfigInterface* fci = RefFCI(); 332 SkFontConfigInterface* fci = RefFCI();
329 return fci ? new SkFontMgr_fontconfig(fci) : nullptr; 333 return fci ? new SkFontMgr_fontconfig(fci) : nullptr;
330 } 334 }
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698