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

Side by Side Diff: skia/ports/font_mgr_factory.cc

Issue 1524473002: Remove fontconfig. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « skia/BUILD.gn ('k') | third_party/fontconfig/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This provides a minimal factory for |SkFontMgr| (with no fonts available from
6 // the system). It uses |SkFontMgr_New_Custom_Embedded()| from
7 // third_party/skia/src/ports/SkFontMgr_custom.cpp.
8 //
9 // TODO(vtl): We should really have our own, even more minimal |SkFontMgr|
10 // implementation. SkFontMgr_custom.cpp includes the ability to gets fonts from
11 // disk (or find them from a directory), which we don't want/need, and
12 // necessitates bringing in third_party/skia/src/utils/SkOSFile.cpp.
13
14 #include "third_party/skia/include/ports/SkFontMgr.h"
15
16 // These are actually declared in
17 // third_party/skia/src/ports/SkFontMgr_custom.cpp (and not in any header). So
18 // we have to (partially) repeat the declarations.
19 struct SkEmbeddedResource;
20 struct SkEmbeddedResourceHeader {
21 const SkEmbeddedResource* entries;
22 int count;
23 };
jamesr 2015/12/11 22:41:11 holy shit
24 SkFontMgr* SkFontMgr_New_Custom_Embedded(
25 const SkEmbeddedResourceHeader* header);
26
27 // Static factory function declared in SkFontMgr.h.
28 // static
29 SkFontMgr* SkFontMgr::Factory() {
30 static const SkEmbeddedResourceHeader kNoEmbeddedFonts = {nullptr, 0};
31 return SkFontMgr_New_Custom_Embedded(&kNoEmbeddedFonts);
32 }
OLDNEW
« no previous file with comments | « skia/BUILD.gn ('k') | third_party/fontconfig/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698