1 /***************************************************************************/
5 /* FreeType utility file for PS names support (body). */
7 /* Copyright 2002-2016 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 /***************************************************************************/
20 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_OBJECTS_H
22 #include FT_INTERNAL_SERVICE_H
23 #include FT_SERVICE_POSTSCRIPT_INFO_H
26 /* documentation is in t1tables.h */
28 FT_EXPORT_DEF( FT_Error )
29 FT_Get_PS_Font_Info( FT_Face face,
30 PS_FontInfoRec* afont_info )
33 FT_Service_PsInfo service;
37 return FT_THROW( Invalid_Face_Handle );
40 return FT_THROW( Invalid_Argument );
42 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
44 if ( service && service->ps_get_font_info )
45 error = service->ps_get_font_info( face, afont_info );
47 error = FT_THROW( Invalid_Argument );
53 /* documentation is in t1tables.h */
55 FT_EXPORT_DEF( FT_Int )
56 FT_Has_PS_Glyph_Names( FT_Face face )
59 FT_Service_PsInfo service;
64 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
66 if ( service && service->ps_has_glyph_names )
67 result = service->ps_has_glyph_names( face );
74 /* documentation is in t1tables.h */
76 FT_EXPORT_DEF( FT_Error )
77 FT_Get_PS_Font_Private( FT_Face face,
78 PS_PrivateRec* afont_private )
81 FT_Service_PsInfo service;
85 return FT_THROW( Invalid_Face_Handle );
88 return FT_THROW( Invalid_Argument );
90 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
92 if ( service && service->ps_get_font_private )
93 error = service->ps_get_font_private( face, afont_private );
95 error = FT_THROW( Invalid_Argument );
101 /* documentation is in t1tables.h */
103 FT_EXPORT_DEF( FT_Long )
104 FT_Get_PS_Font_Value( FT_Face face,
111 FT_Service_PsInfo service = NULL;
116 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
118 if ( service && service->ps_get_font_value )
119 result = service->ps_get_font_value( face, key, idx,