OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 SkTypeface_win_DEFINED | 8 #ifndef SkTypeface_win_DEFINED |
9 #define SkTypeface_win_DEFINED | 9 #define SkTypeface_win_DEFINED |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); | 26 SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); |
27 | 27 |
28 /** | 28 /** |
29 * Set an optional callback to ensure that the data behind a LOGFONT is loaded
. | 29 * Set an optional callback to ensure that the data behind a LOGFONT is loaded
. |
30 * This will get called if Skia tries to access the data but hits a failure. | 30 * This will get called if Skia tries to access the data but hits a failure. |
31 * Normally this is null, and is only required if the font data needs to be | 31 * Normally this is null, and is only required if the font data needs to be |
32 * remotely (re)loaded. | 32 * remotely (re)loaded. |
33 */ | 33 */ |
34 SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&)); | 34 SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&)); |
35 | 35 |
| 36 /** |
| 37 * Set an optional callback to allow the user to create the IDWriteFactory. |
| 38 */ |
| 39 struct IDWriteFactory; |
| 40 SK_API void SkSetDirectWriteFactoryProc(void (*)(IDWriteFactory**)); |
| 41 |
36 // Experimental! | 42 // Experimental! |
37 // | 43 // |
38 class SkFontMgr; | 44 class SkFontMgr; |
39 class SkRemotableFontMgr; | 45 class SkRemotableFontMgr; |
40 | 46 |
41 SK_API SkFontMgr* SkFontMgr_New_GDI(); | 47 SK_API SkFontMgr* SkFontMgr_New_GDI(); |
42 SK_API SkFontMgr* SkFontMgr_New_DirectWrite(); | 48 SK_API SkFontMgr* SkFontMgr_New_DirectWrite(); |
43 | 49 |
44 /** | 50 /** |
45 * Creates an SkFontMgr which renders using DirectWrite and obtains its data | 51 * Creates an SkFontMgr which renders using DirectWrite and obtains its data |
46 * from the SkRemotableFontMgr. | 52 * from the SkRemotableFontMgr. |
47 * | 53 * |
48 * If DirectWrite could not be initialized, will return NULL. | 54 * If DirectWrite could not be initialized, will return NULL. |
49 */ | 55 */ |
50 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr*); | 56 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr*); |
51 | 57 |
52 /** | 58 /** |
53 * Creates an SkRemotableFontMgr backed by DirectWrite using the default | 59 * Creates an SkRemotableFontMgr backed by DirectWrite using the default |
54 * system font collection in the current locale. | 60 * system font collection in the current locale. |
55 * | 61 * |
56 * If DirectWrite could not be initialized, will return NULL. | 62 * If DirectWrite could not be initialized, will return NULL. |
57 */ | 63 */ |
58 SK_API SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite(); | 64 SK_API SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite(); |
59 | 65 |
60 #endif | 66 #endif |
OLD | NEW |