1 | /***************************************************************************/ |
2 | /* */ |
3 | /* ttpic.h */ |
4 | /* */ |
5 | /* The FreeType position independent code services for truetype module. */ |
6 | /* */ |
7 | /* Copyright 2009-2018 by */ |
8 | /* Oran Agra and Mickey Gabel. */ |
9 | /* */ |
10 | /* This file is part of the FreeType project, and may only be used, */ |
11 | /* modified, and distributed under the terms of the FreeType project */ |
12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 | /* this file you indicate that you have read the license and */ |
14 | /* understand and accept it fully. */ |
15 | /* */ |
16 | /***************************************************************************/ |
17 | |
18 | |
19 | #ifndef TTPIC_H_ |
20 | #define TTPIC_H_ |
21 | |
22 | |
23 | #include FT_INTERNAL_PIC_H |
24 | |
25 | |
26 | #ifndef FT_CONFIG_OPTION_PIC |
27 | |
28 | #define TT_SERVICES_GET tt_services |
29 | #define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters |
30 | #define TT_SERVICE_METRICS_VARIATIONS_GET tt_service_metrics_variations |
31 | #define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf |
32 | #define TT_SERVICE_PROPERTIES_GET tt_service_properties |
33 | |
34 | #else /* FT_CONFIG_OPTION_PIC */ |
35 | |
36 | #include FT_MULTIPLE_MASTERS_H |
37 | #include FT_SERVICE_MULTIPLE_MASTERS_H |
38 | #include FT_SERVICE_METRICS_VARIATIONS_H |
39 | #include FT_SERVICE_TRUETYPE_GLYF_H |
40 | #include FT_SERVICE_PROPERTIES_H |
41 | |
42 | |
43 | FT_BEGIN_HEADER |
44 | |
45 | typedef struct TTModulePIC_ |
46 | { |
47 | FT_ServiceDescRec* tt_services; |
48 | #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
49 | FT_Service_MultiMastersRec tt_service_gx_multi_masters; |
50 | FT_Service_MetricsVariationsRec tt_service_metrics_variations; |
51 | #endif |
52 | FT_Service_TTGlyfRec tt_service_truetype_glyf; |
53 | FT_Service_PropertiesRec tt_service_properties; |
54 | |
55 | } TTModulePIC; |
56 | |
57 | |
58 | #define GET_PIC( lib ) \ |
59 | ( (TTModulePIC*)((lib)->pic_container.truetype) ) |
60 | #define TT_SERVICES_GET \ |
61 | ( GET_PIC( library )->tt_services ) |
62 | #define TT_SERVICE_METRICS_VARIATIONS_GET \ |
63 | ( GET_PIC( library )->tt_service_metrics_variations ) |
64 | #define TT_SERVICE_GX_MULTI_MASTERS_GET \ |
65 | ( GET_PIC( library )->tt_service_gx_multi_masters ) |
66 | #define TT_SERVICE_TRUETYPE_GLYF_GET \ |
67 | ( GET_PIC( library )->tt_service_truetype_glyf ) |
68 | #define TT_SERVICE_PROPERTIES_GET \ |
69 | ( GET_PIC( library )->tt_service_properties ) |
70 | |
71 | |
72 | /* see ttpic.c for the implementation */ |
73 | void |
74 | tt_driver_class_pic_free( FT_Library library ); |
75 | |
76 | FT_Error |
77 | tt_driver_class_pic_init( FT_Library library ); |
78 | |
79 | FT_END_HEADER |
80 | |
81 | #endif /* FT_CONFIG_OPTION_PIC */ |
82 | |
83 | /* */ |
84 | |
85 | #endif /* TTPIC_H_ */ |
86 | |
87 | |
88 | /* END */ |
89 | |