1 /***************************************************************************/
5 /* FreeType API for accessing BDF-specific strings (specification). */
7 /* Copyright 2002, 2003, 2004 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
26 #error "freetype.h of FreeType 1 has been loaded!"
27 #error "Please fix the directory search order for header files"
28 #error "so that freetype.h of FreeType 2 is found first."
35 /*************************************************************************/
44 /* BDF specific API. */
47 /* This section contains the declaration of BDF specific functions. */
49 /*************************************************************************/
52 /**********************************************************************
58 * A list of BDF property types.
61 * BDF_PROPERTY_TYPE_NONE ::
62 * Value 0 is used to indicate a missing property.
64 * BDF_PROPERTY_TYPE_ATOM ::
65 * Property is a string atom.
67 * BDF_PROPERTY_TYPE_INTEGER ::
68 * Property is a 32-bit signed integer.
70 * BDF_PROPERTY_TYPE_CARDINAL ::
71 * Property is a 32-bit unsigned integer.
73 typedef enum BDF_PropertyType_
75 BDF_PROPERTY_TYPE_NONE = 0,
76 BDF_PROPERTY_TYPE_ATOM = 1,
77 BDF_PROPERTY_TYPE_INTEGER = 2,
78 BDF_PROPERTY_TYPE_CARDINAL = 3
83 /**********************************************************************
89 * A handle to a @BDF_PropertyRec structure to model a given
92 typedef struct BDF_PropertyRec_* BDF_Property;
95 /**********************************************************************
101 * This structure models a given BDF/PCF property.
108 * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
111 * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
114 * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
116 typedef struct BDF_PropertyRec_
118 BDF_PropertyType type;
129 /**********************************************************************
132 * FT_Get_BDF_Charset_ID
135 * Retrieves a BDF font character set identity, according to
136 * the BDF specification.
140 * A handle to the input face.
143 * acharset_encoding ::
144 * Charset encoding, as a C string, owned by the face.
146 * acharset_registry ::
147 * Charset registry, as a C string, owned by the face.
150 * FreeType error code. 0 means success.
153 * This function only works with BDF faces, returning an error otherwise.
155 FT_EXPORT( FT_Error )
156 FT_Get_BDF_Charset_ID( FT_Face face,
157 const char* *acharset_encoding,
158 const char* *acharset_registry );
161 /**********************************************************************
164 * FT_Get_BDF_Property
167 * Retrieves a BDF property from a BDF or PCF font file.
170 * face :: A handle to the input face.
172 * name :: The property name.
175 * aproperty :: The property.
178 * FreeType error code. 0 means success.
181 * This function works with BDF _and_ PCF fonts. It returns an error
182 * otherwise. It also returns an error if the property is not in the
185 * In case of error, "aproperty->type" is always set to
186 * @BDF_PROPERTY_TYPE_NONE.
188 FT_EXPORT( FT_Error )
189 FT_Get_BDF_Property( FT_Face face,
190 const char* prop_name,
191 BDF_PropertyRec *aproperty );
197 #endif /* __FTBDF_H__ */