Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / include / freetype / ftbdf.h
blob4f8baf84017b52c29b05c0e1b839c1c1adf74021
1 /***************************************************************************/
2 /* */
3 /* ftbdf.h */
4 /* */
5 /* FreeType API for accessing BDF-specific strings (specification). */
6 /* */
7 /* Copyright 2002, 2003, 2004, 2006, 2009 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 /***************************************************************************/
19 #ifndef __FTBDF_H__
20 #define __FTBDF_H__
22 #include <ft2build.h>
23 #include FT_FREETYPE_H
25 #ifdef 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."
29 #endif
32 FT_BEGIN_HEADER
35 /*************************************************************************/
36 /* */
37 /* <Section> */
38 /* bdf_fonts */
39 /* */
40 /* <Title> */
41 /* BDF and PCF Files */
42 /* */
43 /* <Abstract> */
44 /* BDF and PCF specific API. */
45 /* */
46 /* <Description> */
47 /* This section contains the declaration of functions specific to BDF */
48 /* and PCF fonts. */
49 /* */
50 /*************************************************************************/
53 /**********************************************************************
55 * @enum:
56 * FT_PropertyType
58 * @description:
59 * A list of BDF property types.
61 * @values:
62 * BDF_PROPERTY_TYPE_NONE ::
63 * Value~0 is used to indicate a missing property.
65 * BDF_PROPERTY_TYPE_ATOM ::
66 * Property is a string atom.
68 * BDF_PROPERTY_TYPE_INTEGER ::
69 * Property is a 32-bit signed integer.
71 * BDF_PROPERTY_TYPE_CARDINAL ::
72 * Property is a 32-bit unsigned integer.
74 typedef enum BDF_PropertyType_
76 BDF_PROPERTY_TYPE_NONE = 0,
77 BDF_PROPERTY_TYPE_ATOM = 1,
78 BDF_PROPERTY_TYPE_INTEGER = 2,
79 BDF_PROPERTY_TYPE_CARDINAL = 3
81 } BDF_PropertyType;
84 /**********************************************************************
86 * @type:
87 * BDF_Property
89 * @description:
90 * A handle to a @BDF_PropertyRec structure to model a given
91 * BDF/PCF property.
93 typedef struct BDF_PropertyRec_* BDF_Property;
96 /**********************************************************************
98 * @struct:
99 * BDF_PropertyRec
101 * @description:
102 * This structure models a given BDF/PCF property.
104 * @fields:
105 * type ::
106 * The property type.
108 * u.atom ::
109 * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
111 * u.integer ::
112 * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
114 * u.cardinal ::
115 * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
117 typedef struct BDF_PropertyRec_
119 BDF_PropertyType type;
120 union {
121 const char* atom;
122 FT_Int32 integer;
123 FT_UInt32 cardinal;
125 } u;
127 } BDF_PropertyRec;
130 /**********************************************************************
132 * @function:
133 * FT_Get_BDF_Charset_ID
135 * @description:
136 * Retrieve a BDF font character set identity, according to
137 * the BDF specification.
139 * @input:
140 * face ::
141 * A handle to the input face.
143 * @output:
144 * acharset_encoding ::
145 * Charset encoding, as a C~string, owned by the face.
147 * acharset_registry ::
148 * Charset registry, as a C~string, owned by the face.
150 * @return:
151 * FreeType error code. 0~means success.
153 * @note:
154 * This function only works with BDF faces, returning an error otherwise.
156 FT_EXPORT( FT_Error )
157 FT_Get_BDF_Charset_ID( FT_Face face,
158 const char* *acharset_encoding,
159 const char* *acharset_registry );
162 /**********************************************************************
164 * @function:
165 * FT_Get_BDF_Property
167 * @description:
168 * Retrieve a BDF property from a BDF or PCF font file.
170 * @input:
171 * face :: A handle to the input face.
173 * name :: The property name.
175 * @output:
176 * aproperty :: The property.
178 * @return:
179 * FreeType error code. 0~means success.
181 * @note:
182 * This function works with BDF _and_ PCF fonts. It returns an error
183 * otherwise. It also returns an error if the property is not in the
184 * font.
186 * A `property' is a either key-value pair within the STARTPROPERTIES
187 * ... ENDPROPERTIES block of a BDF font or a key-value pair from the
188 * `info->props' array within a `FontRec' structure of a PCF font.
190 * Integer properties are always stored as `signed' within PCF fonts;
191 * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value
192 * for BDF fonts only.
194 * In case of error, `aproperty->type' is always set to
195 * @BDF_PROPERTY_TYPE_NONE.
197 FT_EXPORT( FT_Error )
198 FT_Get_BDF_Property( FT_Face face,
199 const char* prop_name,
200 BDF_PropertyRec *aproperty );
202 /* */
204 FT_END_HEADER
206 #endif /* __FTBDF_H__ */
209 /* END */