tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fterrdef.h (12559B)


      1 /****************************************************************************
      2 *
      3 * fterrdef.h
      4 *
      5 *   FreeType error codes (specification).
      6 *
      7 * Copyright (C) 2002-2025 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  FT_ERRORDEF_( Invalid_SVG_Document,                        0x18,
    105                "invalid SVG document" )
    106 
    107  /* handle errors */
    108 
    109  FT_ERRORDEF_( Invalid_Handle,                              0x20,
    110                "invalid object handle" )
    111  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,
    112                "invalid library handle" )
    113  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,
    114                "invalid module handle" )
    115  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,
    116                "invalid face handle" )
    117  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,
    118                "invalid size handle" )
    119  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,
    120                "invalid glyph slot handle" )
    121  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,
    122                "invalid charmap handle" )
    123  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,
    124                "invalid cache manager handle" )
    125  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,
    126                "invalid stream handle" )
    127 
    128  /* driver errors */
    129 
    130  FT_ERRORDEF_( Too_Many_Drivers,                            0x30,
    131                "too many modules" )
    132  FT_ERRORDEF_( Too_Many_Extensions,                         0x31,
    133                "too many extensions" )
    134 
    135  /* memory errors */
    136 
    137  FT_ERRORDEF_( Out_Of_Memory,                               0x40,
    138                "out of memory" )
    139  FT_ERRORDEF_( Unlisted_Object,                             0x41,
    140                "unlisted object" )
    141 
    142  /* stream errors */
    143 
    144  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,
    145                "cannot open stream" )
    146  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,
    147                "invalid stream seek" )
    148  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,
    149                "invalid stream skip" )
    150  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,
    151                "invalid stream read" )
    152  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,
    153                "invalid stream operation" )
    154  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,
    155                "invalid frame operation" )
    156  FT_ERRORDEF_( Nested_Frame_Access,                         0x57,
    157                "nested frame access" )
    158  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,
    159                "invalid frame read" )
    160 
    161  /* raster errors */
    162 
    163  FT_ERRORDEF_( Raster_Uninitialized,                        0x60,
    164                "raster uninitialized" )
    165  FT_ERRORDEF_( Raster_Corrupted,                            0x61,
    166                "raster corrupted" )
    167  FT_ERRORDEF_( Raster_Overflow,                             0x62,
    168                "raster overflow" )
    169  FT_ERRORDEF_( Raster_Negative_Height,                      0x63,
    170                "negative height while rastering" )
    171 
    172  /* cache errors */
    173 
    174  FT_ERRORDEF_( Too_Many_Caches,                             0x70,
    175                "too many registered caches" )
    176 
    177  /* TrueType and SFNT errors */
    178 
    179  FT_ERRORDEF_( Invalid_Opcode,                              0x80,
    180                "invalid opcode" )
    181  FT_ERRORDEF_( Too_Few_Arguments,                           0x81,
    182                "too few arguments" )
    183  FT_ERRORDEF_( Stack_Overflow,                              0x82,
    184                "stack overflow" )
    185  FT_ERRORDEF_( Code_Overflow,                               0x83,
    186                "code overflow" )
    187  FT_ERRORDEF_( Bad_Argument,                                0x84,
    188                "bad argument" )
    189  FT_ERRORDEF_( Divide_By_Zero,                              0x85,
    190                "division by zero" )
    191  FT_ERRORDEF_( Invalid_Reference,                           0x86,
    192                "invalid reference" )
    193  FT_ERRORDEF_( Debug_OpCode,                                0x87,
    194                "found debug opcode" )
    195  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,
    196                "found ENDF opcode in execution stream" )
    197  FT_ERRORDEF_( Nested_DEFS,                                 0x89,
    198                "nested DEFS" )
    199  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,
    200                "invalid code range" )
    201  FT_ERRORDEF_( Execution_Too_Long,                          0x8B,
    202                "execution context too long" )
    203  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,
    204                "too many function definitions" )
    205  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,
    206                "too many instruction definitions" )
    207  FT_ERRORDEF_( Table_Missing,                               0x8E,
    208                "SFNT font table missing" )
    209  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,
    210                "horizontal header (hhea) table missing" )
    211  FT_ERRORDEF_( Locations_Missing,                           0x90,
    212                "locations (loca) table missing" )
    213  FT_ERRORDEF_( Name_Table_Missing,                          0x91,
    214                "name table missing" )
    215  FT_ERRORDEF_( CMap_Table_Missing,                          0x92,
    216                "character map (cmap) table missing" )
    217  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,
    218                "horizontal metrics (hmtx) table missing" )
    219  FT_ERRORDEF_( Post_Table_Missing,                          0x94,
    220                "PostScript (post) table missing" )
    221  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,
    222                "invalid horizontal metrics" )
    223  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,
    224                "invalid character map (cmap) format" )
    225  FT_ERRORDEF_( Invalid_PPem,                                0x97,
    226                "invalid ppem value" )
    227  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,
    228                "invalid vertical metrics" )
    229  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,
    230                "could not find context" )
    231  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,
    232                "invalid PostScript (post) table format" )
    233  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
    234                "invalid PostScript (post) table" )
    235  FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,
    236                "found FDEF or IDEF opcode in glyf bytecode" )
    237  FT_ERRORDEF_( Missing_Bitmap,                              0x9D,
    238                "missing bitmap in strike" )
    239  FT_ERRORDEF_( Missing_SVG_Hooks,                           0x9E,
    240                "SVG hooks have not been set" )
    241 
    242  /* CFF, CID, and Type 1 errors */
    243 
    244  FT_ERRORDEF_( Syntax_Error,                                0xA0,
    245                "opcode syntax error" )
    246  FT_ERRORDEF_( Stack_Underflow,                             0xA1,
    247                "argument stack underflow" )
    248  FT_ERRORDEF_( Ignore,                                      0xA2,
    249                "ignore" )
    250  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,
    251                "no Unicode glyph name found" )
    252  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,
    253                "glyph too big for hinting" )
    254 
    255  /* BDF errors */
    256 
    257  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,
    258                "`STARTFONT' field missing" )
    259  FT_ERRORDEF_( Missing_Font_Field,                          0xB1,
    260                "`FONT' field missing" )
    261  FT_ERRORDEF_( Missing_Size_Field,                          0xB2,
    262                "`SIZE' field missing" )
    263  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,
    264                "`FONTBOUNDINGBOX' field missing" )
    265  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,
    266                "`CHARS' field missing" )
    267  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,
    268                "`STARTCHAR' field missing" )
    269  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,
    270                "`ENCODING' field missing" )
    271  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,
    272                "`BBX' field missing" )
    273  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,
    274                "`BBX' too big" )
    275  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,
    276                "Font header corrupted or missing fields" )
    277  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,
    278                "Font glyphs corrupted or missing fields" )
    279 
    280  /* */
    281 
    282 
    283 /* END */