OLD | NEW |
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 #ifndef SkFontConfigInterface_DEFINED | 8 #ifndef SkFontConfigInterface_DEFINED |
9 #define SkFontConfigInterface_DEFINED | 9 #define SkFontConfigInterface_DEFINED |
10 | 10 |
11 #include "SkDataTable.h" | 11 #include "SkDataTable.h" |
12 #include "SkFontStyle.h" | 12 #include "SkFontStyle.h" |
13 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
14 #include "SkTArray.h" | |
15 #include "SkTypeface.h" | 14 #include "SkTypeface.h" |
16 | 15 |
17 struct SkBaseMutex; | 16 struct SkBaseMutex; |
18 | 17 |
19 /** | 18 /** |
20 * \class SkFontConfigInterface | 19 * \class SkFontConfigInterface |
21 * | 20 * |
22 * A simple interface for remotable font management. | 21 * A simple interface for remotable font management. |
23 * The global instance can be found with RefGlobal(). | 22 * The global instance can be found with RefGlobal(). |
24 */ | 23 */ |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 /** | 108 /** |
110 * Return a singleton instance of a direct subclass that calls into | 109 * Return a singleton instance of a direct subclass that calls into |
111 * libfontconfig. This does not affect the refcnt of the returned instance. | 110 * libfontconfig. This does not affect the refcnt of the returned instance. |
112 * The mutex may be used to guarantee the singleton is only constructed onc
e. | 111 * The mutex may be used to guarantee the singleton is only constructed onc
e. |
113 */ | 112 */ |
114 static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex* mutex
= NULL); | 113 static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex* mutex
= NULL); |
115 | 114 |
116 // New APIS, which have default impls for now (which do nothing) | 115 // New APIS, which have default impls for now (which do nothing) |
117 | 116 |
118 virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); } | 117 virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); } |
119 virtual bool matchFamilySet(const char[] /*inFamilyName*/, | |
120 SkString* /*outFamilyName*/, | |
121 SkTArray<FontIdentity>*) { | |
122 return false; | |
123 } | |
124 typedef SkRefCnt INHERITED; | 118 typedef SkRefCnt INHERITED; |
125 }; | 119 }; |
126 | 120 |
127 #endif | 121 #endif |
OLD | NEW |