ReactOS 0.4.15-dev-7842-g558ab78
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 2002-2018 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
19#include <ft2build.h>
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
24
25
26 /* documentation is in t1tables.h */
27
30 PS_FontInfoRec* afont_info )
31 {
33 FT_Service_PsInfo service;
34
35
36 if ( !face )
37 return FT_THROW( Invalid_Face_Handle );
38
39 if ( !afont_info )
40 return FT_THROW( Invalid_Argument );
41
42 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
43
44 if ( service && service->ps_get_font_info )
45 error = service->ps_get_font_info( face, afont_info );
46 else
47 error = FT_THROW( Invalid_Argument );
48
49 return error;
50 }
51
52
53 /* documentation is in t1tables.h */
54
57 {
58 FT_Int result = 0;
59 FT_Service_PsInfo service;
60
61
62 if ( face )
63 {
64 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
65
66 if ( service && service->ps_has_glyph_names )
67 result = service->ps_has_glyph_names( face );
68 }
69
70 return result;
71 }
72
73
74 /* documentation is in t1tables.h */
75
78 PS_PrivateRec* afont_private )
79 {
81 FT_Service_PsInfo service;
82
83
84 if ( !face )
85 return FT_THROW( Invalid_Face_Handle );
86
87 if ( !afont_private )
88 return FT_THROW( Invalid_Argument );
89
90 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
91
92 if ( service && service->ps_get_font_private )
93 error = service->ps_get_font_private( face, afont_private );
94 else
95 error = FT_THROW( Invalid_Argument );
96
97 return error;
98 }
99
100
101 /* documentation is in t1tables.h */
102
106 FT_UInt idx,
107 void *value,
108 FT_Long value_len )
109 {
110 FT_Int result = 0;
111 FT_Service_PsInfo service = NULL;
112
113
114 if ( face )
115 {
116 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
117
118 if ( service && service->ps_get_font_value )
119 result = service->ps_get_font_value( face, key, idx,
120 value, value_len );
121 }
122
123 return result;
124 }
125
126
127/* END */
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
#define FT_EXPORT_DEF(x)
Definition: ftconfig.h:483
#define FT_THROW(e)
Definition: ftdebug.h:213
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:75
FT_Get_PS_Font_Private(FT_Face face, PS_PrivateRec *afont_private)
Definition: fttype1.c:77
FT_Has_PS_Glyph_Names(FT_Face face)
Definition: fttype1.c:56
FT_Get_PS_Font_Value(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: fttype1.c:104
FT_Get_PS_Font_Info(FT_Face face, PS_FontInfoRec *afont_info)
Definition: fttype1.c:29
int FT_Error
Definition: fttypes.h:300
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:94