ReactOS 0.4.16-dev-2357-g35d0dfe
fttype1.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * fttype1.c
4 *
5 * FreeType utility file for PS names support (body).
6 *
7 * Copyright (C) 2002-2020 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
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
23
24
25 /* documentation is in t1tables.h */
26
29 PS_FontInfoRec* afont_info )
30 {
32 FT_Service_PsInfo service;
33
34
35 if ( !face )
36 return FT_THROW( Invalid_Face_Handle );
37
38 if ( !afont_info )
39 return FT_THROW( Invalid_Argument );
40
41 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
42
43 if ( service && service->ps_get_font_info )
44 error = service->ps_get_font_info( face, afont_info );
45 else
46 error = FT_THROW( Invalid_Argument );
47
48 return error;
49 }
50
51
52 /* documentation is in t1tables.h */
53
56 {
57 FT_Int result = 0;
58 FT_Service_PsInfo service;
59
60
61 if ( face )
62 {
63 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
64
65 if ( service && service->ps_has_glyph_names )
66 result = service->ps_has_glyph_names( face );
67 }
68
69 return result;
70 }
71
72
73 /* documentation is in t1tables.h */
74
77 PS_PrivateRec* afont_private )
78 {
80 FT_Service_PsInfo service;
81
82
83 if ( !face )
84 return FT_THROW( Invalid_Face_Handle );
85
86 if ( !afont_private )
87 return FT_THROW( Invalid_Argument );
88
89 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
90
91 if ( service && service->ps_get_font_private )
92 error = service->ps_get_font_private( face, afont_private );
93 else
94 error = FT_THROW( Invalid_Argument );
95
96 return error;
97 }
98
99
100 /* documentation is in t1tables.h */
101
105 FT_UInt idx,
106 void *value,
107 FT_Long value_len )
108 {
109 FT_Int result = 0;
110 FT_Service_PsInfo service = NULL;
111
112
113 if ( face )
114 {
115 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
116
117 if ( service && service->ps_get_font_value )
118 result = service->ps_get_font_value( face, key, idx,
119 value, value_len );
120 }
121
122 return result;
123 }
124
125
126/* END */
#define FT_EXPORT_DEF(x)
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
#define FT_THROW(e)
Definition: ftdebug.h:243
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:77
FT_Get_PS_Font_Private(FT_Face face, PS_PrivateRec *afont_private)
Definition: fttype1.c:76
FT_Has_PS_Glyph_Names(FT_Face face)
Definition: fttype1.c:55
FT_Get_PS_Font_Value(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: fttype1.c:103
FT_Get_PS_Font_Info(FT_Face face, PS_FontInfoRec *afont_info)
Definition: fttype1.c:28
int FT_Error
Definition: fttypes.h:299
signed long FT_Long
Definition: fttypes.h:242
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLuint64EXT * result
Definition: glext.h:11304
#define error(str)
Definition: mkdosfs.c:1605
Definition: copy.c:22
enum PS_Dict_Keys_ PS_Dict_Keys
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
Definition: pdh_main.c:96