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

Side by Side Diff: src/ports/SkFontConfigInterfaceDirect.h

Issue 1471033002: Fix Google3 fonts. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Move files back to ports. 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2009-2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
9
10 #include "SkFontConfigInterface.h"
11 #include "SkMutex.h"
12
13 #include <fontconfig/fontconfig.h>
14
15 class SkFontConfigInterfaceDirect : public SkFontConfigInterface {
16 public:
17 SkFontConfigInterfaceDirect();
18 ~SkFontConfigInterfaceDirect() override;
19
20 bool matchFamilyName(const char familyName[],
21 SkTypeface::Style requested,
22 FontIdentity* outFontIdentifier,
23 SkString* outFamilyName,
24 SkTypeface::Style* outStyle) override;
25 SkStreamAsset* openStream(const FontIdentity&) override;
26
27 // new APIs
28 SkDataTable* getFamilyNames() override;
29 bool matchFamilySet(const char inFamilyName[],
30 SkString* outFamilyName,
31 SkTArray<FontIdentity>*) override;
32
33 protected:
34 // Returns the string from the pattern, or nullptr
35 static const char* GetName(FcPattern* pattern, const char field[], int index = 0);
36 virtual bool isValidPattern(FcPattern* pattern);
bungeman-skia 2015/11/24 21:56:36 can this just be virtual bool isAccessible(const
dogben 2015/11/30 17:15:31 Done.
37
38 private:
39 SkMutex mutex_;
40
41 FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family,
42 const SkString& family);
43 typedef SkFontConfigInterface INHERITED;
44 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698