OLD | NEW |
---|---|
(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> | |
bungeman-skia
2015/11/30 17:54:40
Can this just be forward declarations, like
struc
dogben
2015/11/30 18:20:21
FcPattern is a typedef. Is there a way to forward-
bungeman-skia
2015/11/30 18:25:39
Ah, yes, ick. Ok, we can leave this alone then.
| |
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 virtual bool isAccessible(const char* filename); | |
bungeman-skia
2015/11/30 17:54:40
As documentation, isAccessible should be private.
dogben
2015/11/30 18:20:21
I called it in src/ports/SkFontConfigInterface_dir
bungeman-skia
2015/11/30 18:25:40
Ah, I see. The code before just defined out the 'a
| |
35 | |
36 private: | |
37 SkMutex mutex_; | |
38 | |
39 bool isValidPattern(FcPattern* pattern); | |
40 FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family, | |
41 const SkString& family); | |
42 typedef SkFontConfigInterface INHERITED; | |
43 }; | |
OLD | NEW |