Chromium Code Reviews| 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 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 * if the FontRef's data is not available. The caller is responsible for | 74 * if the FontRef's data is not available. The caller is responsible for |
| 75 * calling stream->unref() when it is done accessing the data. | 75 * calling stream->unref() when it is done accessing the data. |
| 76 */ | 76 */ |
| 77 virtual SkStream* openStream(const FontIdentity&) = 0; | 77 virtual SkStream* openStream(const FontIdentity&) = 0; |
| 78 | 78 |
| 79 /** | 79 /** |
| 80 * Return a singleton instance of a direct subclass that calls into | 80 * Return a singleton instance of a direct subclass that calls into |
| 81 * libfontconfig. This does not affect the refcnt of the returned instance. | 81 * libfontconfig. This does not affect the refcnt of the returned instance. |
| 82 */ | 82 */ |
| 83 static SkFontConfigInterface* GetSingletonDirectInterface(); | 83 static SkFontConfigInterface* GetSingletonDirectInterface(); |
| 84 | |
| 85 // New APIS, which have default impls for now (which do nothing) | |
| 86 | |
| 87 struct Style { | |
|
bungeman-skia
2013/03/29 19:40:36
Should the style also contain a FontIdentity? Then
reed1
2013/03/29 20:11:58
Done via matchFamilyStyle()
| |
| 88 int fWeight; | |
| 89 int fWidth; | |
| 90 int fSlant; | |
| 91 }; | |
| 92 | |
| 93 virtual int countFamilies(); | |
| 94 virtual int getFamilySet(int index, SkString* outFamilyName, | |
| 95 Style style[], int maxCount); | |
| 96 virtual int matchFamilySet(const char familyName[], SkString* outFamilyName, | |
| 97 Style styles[], int maxCount); | |
| 84 }; | 98 }; |
| 85 | 99 |
| 86 #endif | 100 #endif |
| OLD | NEW |