• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *
3  * fterrdef.h
4  *
5  *   FreeType error codes (specification).
6  *
7  * Copyright (C) 2002-2020 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   /**************************************************************************
20    *
21    * @section:
22    *  error_code_values
23    *
24    * @title:
25    *  Error Code Values
26    *
27    * @abstract:
28    *  All possible error codes returned by FreeType functions.
29    *
30    * @description:
31    *  The list below is taken verbatim from the file `fterrdef.h` (loaded
32    *  automatically by including `FT_FREETYPE_H`).  The first argument of the
33    *  `FT_ERROR_DEF_` macro is the error label; by default, the prefix
34    *  `FT_Err_` gets added so that you get error names like
35    *  `FT_Err_Cannot_Open_Resource`.  The second argument is the error code,
36    *  and the last argument an error string, which is not used by FreeType.
37    *
38    *  Within your application you should **only** use error names and
39    *  **never** its numeric values!  The latter might (and actually do)
40    *  change in forthcoming FreeType versions.
41    *
42    *  Macro `FT_NOERRORDEF_` defines `FT_Err_Ok`, which is always zero.  See
43    *  the 'Error Enumerations' subsection how to automatically generate a
44    *  list of error strings.
45    *
46    */
47 
48 
49   /**************************************************************************
50    *
51    * @enum:
52    *   FT_Err_XXX
53    *
54    */
55 
56   /* generic errors */
57 
58   FT_NOERRORDEF_( Ok,                                        0x00,
59                   "no error" )
60 
61   FT_ERRORDEF_( Cannot_Open_Resource,                        0x01,
62                 "cannot open resource" )
63   FT_ERRORDEF_( Unknown_File_Format,                         0x02,
64                 "unknown file format" )
65   FT_ERRORDEF_( Invalid_File_Format,                         0x03,
66                 "broken file" )
67   FT_ERRORDEF_( Invalid_Version,                             0x04,
68                 "invalid FreeType version" )
69   FT_ERRORDEF_( Lower_Module_Version,                        0x05,
70                 "module version is too low" )
71   FT_ERRORDEF_( Invalid_Argument,                            0x06,
72                 "invalid argument" )
73   FT_ERRORDEF_( Unimplemented_Feature,                       0x07,
74                 "unimplemented feature" )
75   FT_ERRORDEF_( Invalid_Table,                               0x08,
76                 "broken table" )
77   FT_ERRORDEF_( Invalid_Offset,                              0x09,
78                 "broken offset within table" )
79   FT_ERRORDEF_( Array_Too_Large,                             0x0A,
80                 "array allocation size too large" )
81   FT_ERRORDEF_( Missing_Module,                              0x0B,
82                 "missing module" )
83   FT_ERRORDEF_( Missing_Property,                            0x0C,
84                 "missing property" )
85 
86   /* glyph/character errors */
87 
88   FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10,
89                 "invalid glyph index" )
90   FT_ERRORDEF_( Invalid_Character_Code,                      0x11,
91                 "invalid character code" )
92   FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12,
93                 "unsupported glyph image format" )
94   FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13,
95                 "cannot render this glyph format" )
96   FT_ERRORDEF_( Invalid_Outline,                             0x14,
97                 "invalid outline" )
98   FT_ERRORDEF_( Invalid_Composite,                           0x15,
99                 "invalid composite glyph" )
100   FT_ERRORDEF_( Too_Many_Hints,                              0x16,
101                 "too many hints" )
102   FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17,
103                 "invalid pixel size" )
104 
105   /* handle errors */
106 
107   FT_ERRORDEF_( Invalid_Handle,                              0x20,
108                 "invalid object handle" )
109   FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,
110                 "invalid library handle" )
111   FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,
112                 "invalid module handle" )
113   FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,
114                 "invalid face handle" )
115   FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,
116                 "invalid size handle" )
117   FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,
118                 "invalid glyph slot handle" )
119   FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,
120                 "invalid charmap handle" )
121   FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,
122                 "invalid cache manager handle" )
123   FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,
124                 "invalid stream handle" )
125 
126   /* driver errors */
127 
128   FT_ERRORDEF_( Too_Many_Drivers,                            0x30,
129                 "too many modules" )
130   FT_ERRORDEF_( Too_Many_Extensions,                         0x31,
131                 "too many extensions" )
132 
133   /* memory errors */
134 
135   FT_ERRORDEF_( Out_Of_Memory,                               0x40,
136                 "out of memory" )
137   FT_ERRORDEF_( Unlisted_Object,                             0x41,
138                 "unlisted object" )
139 
140   /* stream errors */
141 
142   FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,
143                 "cannot open stream" )
144   FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,
145                 "invalid stream seek" )
146   FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,
147                 "invalid stream skip" )
148   FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,
149                 "invalid stream read" )
150   FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,
151                 "invalid stream operation" )
152   FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,
153                 "invalid frame operation" )
154   FT_ERRORDEF_( Nested_Frame_Access,                         0x57,
155                 "nested frame access" )
156   FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,
157                 "invalid frame read" )
158 
159   /* raster errors */
160 
161   FT_ERRORDEF_( Raster_Uninitialized,                        0x60,
162                 "raster uninitialized" )
163   FT_ERRORDEF_( Raster_Corrupted,                            0x61,
164                 "raster corrupted" )
165   FT_ERRORDEF_( Raster_Overflow,                             0x62,
166                 "raster overflow" )
167   FT_ERRORDEF_( Raster_Negative_Height,                      0x63,
168                 "negative height while rastering" )
169 
170   /* cache errors */
171 
172   FT_ERRORDEF_( Too_Many_Caches,                             0x70,
173                 "too many registered caches" )
174 
175   /* TrueType and SFNT errors */
176 
177   FT_ERRORDEF_( Invalid_Opcode,                              0x80,
178                 "invalid opcode" )
179   FT_ERRORDEF_( Too_Few_Arguments,                           0x81,
180                 "too few arguments" )
181   FT_ERRORDEF_( Stack_Overflow,                              0x82,
182                 "stack overflow" )
183   FT_ERRORDEF_( Code_Overflow,                               0x83,
184                 "code overflow" )
185   FT_ERRORDEF_( Bad_Argument,                                0x84,
186                 "bad argument" )
187   FT_ERRORDEF_( Divide_By_Zero,                              0x85,
188                 "division by zero" )
189   FT_ERRORDEF_( Invalid_Reference,                           0x86,
190                 "invalid reference" )
191   FT_ERRORDEF_( Debug_OpCode,                                0x87,
192                 "found debug opcode" )
193   FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,
194                 "found ENDF opcode in execution stream" )
195   FT_ERRORDEF_( Nested_DEFS,                                 0x89,
196                 "nested DEFS" )
197   FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,
198                 "invalid code range" )
199   FT_ERRORDEF_( Execution_Too_Long,                          0x8B,
200                 "execution context too long" )
201   FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,
202                 "too many function definitions" )
203   FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,
204                 "too many instruction definitions" )
205   FT_ERRORDEF_( Table_Missing,                               0x8E,
206                 "SFNT font table missing" )
207   FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,
208                 "horizontal header (hhea) table missing" )
209   FT_ERRORDEF_( Locations_Missing,                           0x90,
210                 "locations (loca) table missing" )
211   FT_ERRORDEF_( Name_Table_Missing,                          0x91,
212                 "name table missing" )
213   FT_ERRORDEF_( CMap_Table_Missing,                          0x92,
214                 "character map (cmap) table missing" )
215   FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,
216                 "horizontal metrics (hmtx) table missing" )
217   FT_ERRORDEF_( Post_Table_Missing,                          0x94,
218                 "PostScript (post) table missing" )
219   FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,
220                 "invalid horizontal metrics" )
221   FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,
222                 "invalid character map (cmap) format" )
223   FT_ERRORDEF_( Invalid_PPem,                                0x97,
224                 "invalid ppem value" )
225   FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,
226                 "invalid vertical metrics" )
227   FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,
228                 "could not find context" )
229   FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,
230                 "invalid PostScript (post) table format" )
231   FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
232                 "invalid PostScript (post) table" )
233   FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,
234                 "found FDEF or IDEF opcode in glyf bytecode" )
235   FT_ERRORDEF_( Missing_Bitmap,                              0x9D,
236                 "missing bitmap in strike" )
237 
238   /* CFF, CID, and Type 1 errors */
239 
240   FT_ERRORDEF_( Syntax_Error,                                0xA0,
241                 "opcode syntax error" )
242   FT_ERRORDEF_( Stack_Underflow,                             0xA1,
243                 "argument stack underflow" )
244   FT_ERRORDEF_( Ignore,                                      0xA2,
245                 "ignore" )
246   FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,
247                 "no Unicode glyph name found" )
248   FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,
249                 "glyph too big for hinting" )
250 
251   /* BDF errors */
252 
253   FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,
254                 "`STARTFONT' field missing" )
255   FT_ERRORDEF_( Missing_Font_Field,                          0xB1,
256                 "`FONT' field missing" )
257   FT_ERRORDEF_( Missing_Size_Field,                          0xB2,
258                 "`SIZE' field missing" )
259   FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,
260                 "`FONTBOUNDINGBOX' field missing" )
261   FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,
262                 "`CHARS' field missing" )
263   FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,
264                 "`STARTCHAR' field missing" )
265   FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,
266                 "`ENCODING' field missing" )
267   FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,
268                 "`BBX' field missing" )
269   FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,
270                 "`BBX' too big" )
271   FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,
272                 "Font header corrupted or missing fields" )
273   FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,
274                 "Font glyphs corrupted or missing fields" )
275 
276   /* */
277 
278 
279 /* END */
280