1 /***************************************************************************/
5 /* FreeType API for accessing BDF-specific strings (specification). */
7 /* Copyright 2002 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. */
16 /***************************************************************************/
23 #include FT_FREETYPE_H
29 /*************************************************************************/
38 /* BDF-specific APIs */
41 /* This section contains the declaration of BDF-specific functions. */
43 /*************************************************************************/
46 /**********************************************************************
52 * list of BDF property types
55 * BDF_PROPERTY_TYPE_NONE ::
56 * value 0 is used to indicate a missing property
58 * BDF_PROPERTY_TYPE_ATOM ::
59 * property is a string atom
61 * BDF_PROPERTY_TYPE_INTEGER ::
62 * property is a 32-bit signed integer
64 * BDF_PROPERTY_TYPE_CARDINAL ::
65 * property is a 32-bit unsigned integer
69 BDF_PROPERTY_TYPE_NONE = 0,
70 BDF_PROPERTY_TYPE_ATOM = 1,
71 BDF_PROPERTY_TYPE_INTEGER = 2,
72 BDF_PROPERTY_TYPE_CARDINAL = 3
77 /**********************************************************************
82 * handle to a @BDF_PropertyRec structure used to model a given
85 typedef struct BDF_PropertyRec_* BDF_Property;
87 /**********************************************************************
89 * @struct: BDF_PropertyRec
92 * models a given BDF/PCF property
95 * type :: property type
96 * u.atom :: atom string, when type is @BDF_PROPERTY_TYPE_ATOM
97 * u.integer :: signed integer, when type is @BDF_PROPERTY_TYPE_INTEGER
98 * u.cardinal :: unsigned integer, when type is @BDF_PROPERTY_TYPE_CARDINAL
100 typedef struct BDF_PropertyRec_
102 BDF_PropertyType type;
113 /**********************************************************************
116 * FT_Get_BDF_Charset_ID
119 * Retrieves a BDF font character set identity, according to
120 * the BDF specification.
124 * handle to input face
127 * acharset_encoding ::
128 * Charset encoding, as a C string, owned by the face.
130 * acharset_registry ::
131 * Charset registry, as a C string, owned by the face.
134 * FreeType rror code. 0 means success.
137 * This function only works with BDF faces, returning an error otherwise.
139 FT_EXPORT( FT_Error )
140 FT_Get_BDF_Charset_ID( FT_Face face,
141 const char* *acharset_encoding,
142 const char* *acharset_registry );
144 /**********************************************************************
147 * FT_Get_BDF_Property
150 * Retrieves a BDF property from a BDF or PCF font file
153 * face :: handle to input face
154 * name :: property name
157 * aproperty :: the property
160 * FreeType error code. 0 means success.
163 * This function works with BDF _and_ PCF fonts. It returns an error
164 * otherwise. it also returns an error when the property is not in the
167 * in case of error, "aproperty->type" is always set to
168 * @BDF_PROPERTY_TYPE_NONE
170 FT_EXPORT( FT_Error )
171 FT_Get_BDF_Property( FT_Face face,
172 const char* prop_name,
173 BDF_PropertyRec *aproperty );
179 #endif /* __FTBDF_H__ */