OLD | NEW |
| (Empty) |
1 /***************************************************************************/ | |
2 /* */ | |
3 /* sfntpic.h */ | |
4 /* */ | |
5 /* The FreeType position independent code services for sfnt module. */ | |
6 /* */ | |
7 /* Copyright 2009, 2012 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 __SFNTPIC_H__ | |
20 #define __SFNTPIC_H__ | |
21 | |
22 | |
23 FT_BEGIN_HEADER | |
24 | |
25 #include "../../include/freetype/internal/ftpic.h" | |
26 | |
27 | |
28 #ifndef FT_CONFIG_OPTION_PIC | |
29 | |
30 #define SFNT_SERVICES_GET sfnt_services | |
31 #define SFNT_SERVICE_GLYPH_DICT_GET sfnt_service_glyph_dict | |
32 #define SFNT_SERVICE_PS_NAME_GET sfnt_service_ps_name | |
33 #define TT_SERVICE_CMAP_INFO_GET tt_service_get_cmap_info | |
34 #define SFNT_SERVICES_GET sfnt_services | |
35 #define TT_CMAP_CLASSES_GET tt_cmap_classes | |
36 #define SFNT_SERVICE_SFNT_TABLE_GET sfnt_service_sfnt_table | |
37 #define SFNT_SERVICE_BDF_GET sfnt_service_bdf | |
38 #define SFNT_INTERFACE_GET sfnt_interface | |
39 | |
40 #else /* FT_CONFIG_OPTION_PIC */ | |
41 | |
42 /* some include files required for members of sfntModulePIC */ | |
43 #include "../../include/freetype/internal/services/svgldict.h" | |
44 #include "../../include/freetype/internal/services/svpostnm.h" | |
45 #include "../../include/freetype/internal/services/svsfnt.h" | |
46 #include "../../include/freetype/internal/services/svttcmap.h" | |
47 | |
48 #ifdef TT_CONFIG_OPTION_BDF | |
49 #include "ttbdf.h" | |
50 #include "../../include/freetype/internal/services/svbdf.h" | |
51 #endif | |
52 | |
53 #include "../../include/freetype/internal/ftdebug.h" | |
54 #include "../../include/freetype/internal/ftstream.h" | |
55 #include "../../include/freetype/internal/sfnt.h" | |
56 #include "ttcmap.h" | |
57 | |
58 | |
59 typedef struct sfntModulePIC_ | |
60 { | |
61 FT_ServiceDescRec* sfnt_services; | |
62 FT_Service_GlyphDictRec sfnt_service_glyph_dict; | |
63 FT_Service_PsFontNameRec sfnt_service_ps_name; | |
64 FT_Service_TTCMapsRec tt_service_get_cmap_info; | |
65 TT_CMap_Class* tt_cmap_classes; | |
66 FT_Service_SFNT_TableRec sfnt_service_sfnt_table; | |
67 #ifdef TT_CONFIG_OPTION_BDF | |
68 FT_Service_BDFRec sfnt_service_bdf; | |
69 #endif | |
70 SFNT_Interface sfnt_interface; | |
71 | |
72 } sfntModulePIC; | |
73 | |
74 | |
75 #define GET_PIC( lib ) \ | |
76 ( (sfntModulePIC*)( (lib)->pic_container.sfnt ) ) | |
77 | |
78 #define SFNT_SERVICES_GET \ | |
79 ( GET_PIC( library )->sfnt_services ) | |
80 #define SFNT_SERVICE_GLYPH_DICT_GET \ | |
81 ( GET_PIC( library )->sfnt_service_glyph_dict ) | |
82 #define SFNT_SERVICE_PS_NAME_GET \ | |
83 ( GET_PIC( library )->sfnt_service_ps_name ) | |
84 #define TT_SERVICE_CMAP_INFO_GET \ | |
85 ( GET_PIC( library )->tt_service_get_cmap_info ) | |
86 #define SFNT_SERVICES_GET \ | |
87 ( GET_PIC( library )->sfnt_services ) | |
88 #define TT_CMAP_CLASSES_GET \ | |
89 ( GET_PIC( library )->tt_cmap_classes ) | |
90 #define SFNT_SERVICE_SFNT_TABLE_GET \ | |
91 ( GET_PIC( library )->sfnt_service_sfnt_table ) | |
92 #define SFNT_SERVICE_BDF_GET \ | |
93 ( GET_PIC( library )->sfnt_service_bdf ) | |
94 #define SFNT_INTERFACE_GET \ | |
95 ( GET_PIC( library )->sfnt_interface ) | |
96 | |
97 | |
98 /* see sfntpic.c for the implementation */ | |
99 void | |
100 sfnt_module_class_pic_free( FT_Library library ); | |
101 | |
102 FT_Error | |
103 sfnt_module_class_pic_init( FT_Library library ); | |
104 | |
105 #endif /* FT_CONFIG_OPTION_PIC */ | |
106 | |
107 /* */ | |
108 | |
109 FT_END_HEADER | |
110 | |
111 #endif /* __SFNTPIC_H__ */ | |
112 | |
113 | |
114 /* END */ | |
OLD | NEW |