1 /***************************************************************************/
5 /* The FreeType glyph dictionary services (specification). */
7 /* Copyright 2003, 2009, 2012 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 /***************************************************************************/
19 #ifndef __SVGLDICT_H__
20 #define __SVGLDICT_H__
22 #include FT_INTERNAL_SERVICE_H
29 * A service used to retrieve glyph names, as well as to find the
30 * index of a given glyph name in a font.
34 #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict"
38 (*FT_GlyphDict_GetNameFunc
)( FT_Face face
,
44 (*FT_GlyphDict_NameIndexFunc
)( FT_Face face
,
45 FT_String
* glyph_name
);
48 FT_DEFINE_SERVICE( GlyphDict
)
50 FT_GlyphDict_GetNameFunc get_name
;
51 FT_GlyphDict_NameIndexFunc name_index
; /* optional */
55 #ifndef FT_CONFIG_OPTION_PIC
57 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
60 static const FT_Service_GlyphDictRec class_ = \
62 get_name_, name_index_ \
65 #else /* FT_CONFIG_OPTION_PIC */
67 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
71 FT_Init_Class_ ## class_( FT_Library library, \
72 FT_Service_GlyphDictRec* clazz ) \
74 FT_UNUSED( library ); \
76 clazz->get_name = get_name_; \
77 clazz->name_index = name_index_; \
80 #endif /* FT_CONFIG_OPTION_PIC */
88 #endif /* __SVGLDICT_H__ */