1 /***************************************************************************/
5 /* The FreeType CFF tables loader service (specification). */
7 /* Copyright 2017-2018 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16 /***************************************************************************/
22 #include FT_INTERNAL_SERVICE_H
23 #include FT_INTERNAL_CFF_TYPES_H
29 #define FT_SERVICE_ID_CFF_LOAD "cff-load"
33 (*FT_Get_Standard_Encoding_Func
)( FT_UInt charcode
);
36 (*FT_Load_Private_Dict_Func
)( CFF_Font font
,
42 (*FT_FD_Select_Get_Func
)( CFF_FDSelect fdselect
,
43 FT_UInt glyph_index
);
46 (*FT_Blend_Check_Vector_Func
)( CFF_Blend blend
,
52 (*FT_Blend_Build_Vector_Func
)( CFF_Blend blend
,
58 FT_DEFINE_SERVICE( CFFLoad
)
60 FT_Get_Standard_Encoding_Func get_standard_encoding
;
61 FT_Load_Private_Dict_Func load_private_dict
;
62 FT_FD_Select_Get_Func fd_select_get
;
63 FT_Blend_Check_Vector_Func blend_check_vector
;
64 FT_Blend_Build_Vector_Func blend_build_vector
;
68 #ifndef FT_CONFIG_OPTION_PIC
70 #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \
71 get_standard_encoding_, \
74 blend_check_vector_, \
75 blend_build_vector_ ) \
76 static const FT_Service_CFFLoadRec class_ = \
78 get_standard_encoding_, \
81 blend_check_vector_, \
85 #else /* FT_CONFIG_OPTION_PIC */
87 #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \
88 get_standard_encoding_, \
91 blend_check_vector_, \
92 blend_build_vector_ ) \
94 FT_Init_Class_ ## class_( FT_Service_CFFLoadRec* clazz ) \
96 clazz->get_standard_encoding = get_standard_encoding_; \
97 clazz->load_private_dict = load_private_dict_; \
98 clazz->fd_select_get = fd_select_get_; \
99 clazz->blend_check_vector = blend_check_vector_; \
100 clazz->blend_build_vector = blend_build_vector_; \
103 #endif /* FT_CONFIG_OPTION_PIC */