zenilib: zenilib/jni/external/freetype2/src/base/ftbdf.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
ftbdf.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ftbdf.c */
4 /* */
5 /* FreeType API for accessing BDF-specific strings (body). */
6 /* */
7 /* Copyright 2002, 2003, 2004 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_SERVICE_BDF_H
22
23
24 /* documentation is in ftbdf.h */
25
26 FT_EXPORT_DEF( FT_Error )
27 FT_Get_BDF_Charset_ID( FT_Face face,
28 const char* *acharset_encoding,
29 const char* *acharset_registry )
30 {
31 FT_Error error;
32 const char* encoding = NULL;
33 const char* registry = NULL;
34
35
36 error = FT_Err_Invalid_Argument;
37
38 if ( face )
39 {
40 FT_Service_BDF service;
41
42
43 FT_FACE_FIND_SERVICE( face, service, BDF );
44
45 if ( service && service->get_charset_id )
46 error = service->get_charset_id( face, &encoding, &registry );
47 }
48
49 if ( acharset_encoding )
50 *acharset_encoding = encoding;
51
52 if ( acharset_registry )
53 *acharset_registry = registry;
54
55 return error;
56 }
57
58
59 /* documentation is in ftbdf.h */
60
61 FT_EXPORT_DEF( FT_Error )
62 FT_Get_BDF_Property( FT_Face face,
63 const char* prop_name,
64 BDF_PropertyRec *aproperty )
65 {
66 FT_Error error;
67
68
69 error = FT_Err_Invalid_Argument;
70
71 aproperty->type = BDF_PROPERTY_TYPE_NONE;
72
73 if ( face )
74 {
75 FT_Service_BDF service;
76
77
78 FT_FACE_FIND_SERVICE( face, service, BDF );
79
80 if ( service && service->get_property )
81 error = service->get_property( face, prop_name, aproperty );
82 }
83
84 return error;
85 }
86
87
88 /* END */
FT_Error
int FT_Error
Definition: fttypes.h:296
NULL
#define NULL
Definition: ftobjs.h:61
FT_Err_Invalid_Argument
return FT_Err_Invalid_Argument
Definition: ftbbox.c:584
BDF_PropertyRec_
Definition: ftbdf.h:117
registry
const char ** registry
Definition: cffdrivr.c:443
FT_FaceRec_
Definition: freetype.h:912
error
FT_Error error
Definition: cffdrivr.c:407
face
GLenum face
Definition: gl2ext.h:1490
BDF_PROPERTY_TYPE_NONE
Definition: ftbdf.h:76
const
#define const
Definition: zconf.h:91
ft2build.h
FT_EXPORT_DEF
#define FT_EXPORT_DEF(x)
Definition: ftconfig.h:511
FT_Get_BDF_Charset_ID
FT_Get_BDF_Charset_ID(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
Definition: ftbdf.c:27
FT_FACE_FIND_SERVICE
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:83
FT_Get_BDF_Property
FT_Get_BDF_Property(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
Definition: ftbdf.c:62