zenilib: zenilib/jni/external/freetype2/src/base/fttype1.c Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2004, 2011 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_OBJECTS_H
21 #include FT_INTERNAL_SERVICE_H
22 #include FT_SERVICE_POSTSCRIPT_INFO_H
23
24
25 /* documentation is in t1tables.h */
26
27 FT_EXPORT_DEF( FT_Error )
28 FT_Get_PS_Font_Info( FT_Face face,
29 PS_FontInfoRec* afont_info )
30 {
31 FT_Error error = FT_Err_Invalid_Argument;
32
33
34 if ( face )
35 {
36 FT_Service_PsInfo service = NULL;
37
38
39 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
40
41 if ( service && service->ps_get_font_info )
42 error = service->ps_get_font_info( face, afont_info );
43 }
44
45 return error;
46 }
47
48
49 /* documentation is in t1tables.h */
50
51 FT_EXPORT_DEF( FT_Int )
52 FT_Has_PS_Glyph_Names( FT_Face face )
53 {
54 FT_Int result = 0;
55 FT_Service_PsInfo service = NULL;
56
57
58 if ( face )
59 {
60 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
61
62 if ( service && service->ps_has_glyph_names )
63 result = service->ps_has_glyph_names( face );
64 }
65
66 return result;
67 }
68
69
70 /* documentation is in t1tables.h */
71
72 FT_EXPORT_DEF( FT_Error )
73 FT_Get_PS_Font_Private( FT_Face face,
74 PS_PrivateRec* afont_private )
75 {
76 FT_Error error = FT_Err_Invalid_Argument;
77
78
79 if ( face )
80 {
81 FT_Service_PsInfo service = NULL;
82
83
84 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
85
86 if ( service && service->ps_get_font_private )
87 error = service->ps_get_font_private( face, afont_private );
88 }
89
90 return error;
91 }
92
93
94 /* documentation is in t1tables.h */
95
96 FT_EXPORT_DEF( FT_Long )
97 FT_Get_PS_Font_Value( FT_Face face,
98 PS_Dict_Keys key,
99 FT_UInt idx,
100 void *value,
101 FT_Long value_len )
102 {
103 FT_Int result = 0;
104 FT_Service_PsInfo service = NULL;
105
106
107 if ( face )
108 {
109 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
110
111 if ( service && service->ps_get_font_value )
112 result = service->ps_get_font_value( face, key, idx,
113 value, value_len );
114 }
115
116 return result;
117 }
118
119
120 /* END */
FT_Error
int FT_Error
Definition: fttypes.h:296
PS_Dict_Keys
enum PS_Dict_Keys_ PS_Dict_Keys
FT_Long
signed long FT_Long
Definition: fttypes.h:238
NULL
#define NULL
Definition: ftobjs.h:61
FT_Int
signed int FT_Int
Definition: fttypes.h:216
FT_Err_Invalid_Argument
return FT_Err_Invalid_Argument
Definition: ftbbox.c:584
FT_Get_PS_Font_Private
FT_Get_PS_Font_Private(FT_Face face, PS_Private afont_private)
FT_Get_PS_Font_Info
FT_Get_PS_Font_Info(FT_Face face, PS_FontInfo afont_info)
PS_PrivateRec_
Definition: t1tables.h:118
result
GLuint64EXT * result
Definition: glew.h:12708
FT_FaceRec_
Definition: freetype.h:912
idx
FT_UInt idx
Definition: cffcmap.c:125
error
FT_Error error
Definition: cffdrivr.c:407
face
GLenum face
Definition: gl2ext.h:1490
FT_Get_PS_Font_Value
FT_Get_PS_Font_Value(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: fttype1.c:97
FT_Has_PS_Glyph_Names
FT_Has_PS_Glyph_Names(FT_Face face)
Definition: fttype1.c:52
value
EGLSurface EGLint void ** value
Definition: eglext.h:301
ft2build.h
FT_EXPORT_DEF
#define FT_EXPORT_DEF(x)
Definition: ftconfig.h:511
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
PS_FontInfoRec
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
FT_FACE_FIND_SERVICE
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:83