1 /****************************************************************************
5 * FreeType utility file for PS names support (body).
7 * Copyright (C) 2002-2023 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.
19 #include <freetype/internal/ftdebug.h>
20 #include <freetype/internal/ftobjs.h>
21 #include <freetype/internal/ftserv.h>
22 #include <freetype/internal/services/svpsinfo.h>
25 /* documentation is in t1tables.h */
27 FT_EXPORT_DEF( FT_Error )
28 FT_Get_PS_Font_Info( FT_Face face,
29 PS_FontInfoRec* afont_info )
32 FT_Service_PsInfo service;
36 return FT_THROW( Invalid_Face_Handle );
39 return FT_THROW( Invalid_Argument );
41 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
43 if ( service && service->ps_get_font_info )
44 error = service->ps_get_font_info( face, afont_info );
46 error = FT_THROW( Invalid_Argument );
52 /* documentation is in t1tables.h */
54 FT_EXPORT_DEF( FT_Int )
55 FT_Has_PS_Glyph_Names( FT_Face face )
58 FT_Service_PsInfo service;
63 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
65 if ( service && service->ps_has_glyph_names )
66 result = service->ps_has_glyph_names( face );
73 /* documentation is in t1tables.h */
75 FT_EXPORT_DEF( FT_Error )
76 FT_Get_PS_Font_Private( FT_Face face,
77 PS_PrivateRec* afont_private )
80 FT_Service_PsInfo service;
84 return FT_THROW( Invalid_Face_Handle );
87 return FT_THROW( Invalid_Argument );
89 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
91 if ( service && service->ps_get_font_private )
92 error = service->ps_get_font_private( face, afont_private );
94 error = FT_THROW( Invalid_Argument );
100 /* documentation is in t1tables.h */
102 FT_EXPORT_DEF( FT_Long )
103 FT_Get_PS_Font_Value( FT_Face face,
110 FT_Service_PsInfo service = NULL;
115 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
117 if ( service && service->ps_get_font_value )
118 result = service->ps_get_font_value( face, key, idx,