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

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

Issue 21331003: adapt FontConfig to use SK_FONTHOST_USES_FONTMGR (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « gyp/ports.gyp ('k') | src/ports/SkFontConfigTypeface.h » ('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 #include "SkFontMgr.h" 8 #include "SkFontMgr.h"
9 #include "SkFontStyle.h" 9 #include "SkFontStyle.h"
10 #include "SkFontConfigInterface.h" 10 #include "SkFontConfigInterface.h"
11 #include "SkFontConfigTypeface.h"
11 #include "SkMath.h" 12 #include "SkMath.h"
12 #include "SkString.h" 13 #include "SkString.h"
13 #include "SkTDArray.h" 14 #include "SkTDArray.h"
14 15
15 // for now we pull these in directly. eventually we will solely rely on the 16 // for now we pull these in directly. eventually we will solely rely on the
16 // SkFontConfigInterface instance. 17 // SkFontConfigInterface instance.
17 #include <fontconfig/fontconfig.h> 18 #include <fontconfig/fontconfig.h>
18 #include <unistd.h> 19 #include <unistd.h>
19 20
20 // borrow this global from SkFontHost_fontconfig. eventually that file should 21 // borrow this global from SkFontHost_fontconfig. eventually that file should
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, 261 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*,
261 const SkFontStyle&) { return NULL; } 262 const SkFontStyle&) { return NULL; }
262 263
263 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) { return NULL; } 264 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) { return NULL; }
264 virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) { 265 virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) {
265 return NULL; 266 return NULL;
266 } 267 }
267 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) { 268 virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) {
268 return NULL; 269 return NULL;
269 } 270 }
271
272 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
273 unsigned styleBits) SK_OVERRIDE {
274 return FontConfigTypeface::LegacyCreateTypeface(NULL, familyName,
275 (SkTypeface::Style)styleBits);
276 }
270 }; 277 };
271 278
272 SkFontMgr* SkFontMgr::Factory() { 279 SkFontMgr* SkFontMgr::Factory() {
273 SkFontConfigInterface* fci = RefFCI(); 280 SkFontConfigInterface* fci = RefFCI();
274 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL; 281 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL;
275 } 282 }
OLDNEW
« no previous file with comments | « gyp/ports.gyp ('k') | src/ports/SkFontConfigTypeface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698