Al-Qurtas-Islamic-bank-The-.../include/freetype/fterrors.h

119 lines
6.7 KiB
C
Raw Normal View History

/***************************************************************************/
/* */
/* fterrors.h */
/* */
/* FreeType error codes (specification). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
/* modified and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/* This file is used to define the FreeType error enumeration constants */
/* It can also be used to create an error message table easily with */
/* something like: */
/* */
/* { */
/* */
/* #undef FTERRORS_H */
/* #define FT_ERRORDEF( e, v, s ) { e, s ], */
/* #define FT_ERROR_START_LIST { */
/* #define FT_ERROR_END_LIST { 0, 0 } }; */
/* */
/* const struct { int err_code; const char* err_msg } ft_errors[] = */
/* #include <freetype/fterrors.h> */
/* } */
/* */
/***************************************************************************/
#ifndef FTERRORS_H
#define FTERRORS_H
#ifndef FT_ERRORDEF
#define FT_ERRORDEF( e, v, s ) e = v,
#define FT_ERROR_START_LIST enum {
#define FT_ERROR_END_LIST FT_Err_Max };
#endif /* FT_ERRORDEF */
#ifdef FT_ERROR_START_LIST
FT_ERROR_START_LIST
#endif
FT_ERRORDEF( FT_Err_Ok, 0x0000, "no error" )
FT_ERRORDEF( FT_Err_Cannot_Open_Resource, 0x0001, "can't open stream" )
FT_ERRORDEF( FT_Err_Unknown_File_Format, 0x0002, "unknown file format" )
FT_ERRORDEF( FT_Err_Invalid_File_Format, 0x0003, "broken file" )
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Invalid_Argument, 0x0010, "invalid argument" )
FT_ERRORDEF( FT_Err_Invalid_Handle, 0x0011, "invalid object handle" )
FT_ERRORDEF( FT_Err_Invalid_Glyph_Index, 0x0012, "invalid glyph index" )
FT_ERRORDEF( FT_Err_Invalid_Character_Code, 0x0013, "invalid character code" )
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Unimplemented_Feature, 0x0020, "unimplemented feature" )
FT_ERRORDEF( FT_Err_Invalid_Glyph_Format, 0x0021, "unsupported glyph image format" )
FT_ERRORDEF( FT_Err_Cannot_Render_Glyph, 0x0022, "cannot render this glyph format" )
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Invalid_Library_Handle, 0x0030, "invalid library handle" )
FT_ERRORDEF( FT_Err_Invalid_Driver_Handle, 0x0031, "invalid module handle" )
FT_ERRORDEF( FT_Err_Invalid_Face_Handle, 0x0032, "invalid face handle" )
FT_ERRORDEF( FT_Err_Invalid_Size_Handle, 0x0033, "invalid size handle" )
FT_ERRORDEF( FT_Err_Invalid_Slot_Handle, 0x0034, "invalid glyph slot handle" )
FT_ERRORDEF( FT_Err_Invalid_CharMap_Handle, 0x0035, "invalid charmap handle" )
FT_ERRORDEF( FT_Err_Invalid_Outline, 0x0036, "invalid outline" )
FT_ERRORDEF( FT_Err_Invalid_Dimensions, 0x0037, "invalid dimensions" )
- MAJOR INTERNAL REDESIGN: A lot of internal modifications have been performed lately on the source in order to provide the following enhancements: - more generic module support: The FT_Module type is now defined to represent a handle to a given module. The file <freetype/ftmodule.h> contains the FT_Module_Class definition, as well as the module-loading public API The FT_Driver type is still defined, and still represents a pointer to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module, FT_Get_Driver by FT_Get_Module, etc.. - support for generic glyph image types: The FT_Renderer type is a pointer to a module used to perform various operations on glyph image. Each renderer is capable of handling images in a single format (e.g. ft_glyph_format_outline). Its functions are used to: - transform an glyph image - render a glyph image into a bitmap - return the control box (dimensions) of a given glyph image The scan converters "ftraster.c" and "ftgrays.c" have been moved to the new directory "src/renderer", and are used to provide two default renderer modules. One corresponds to the "standard" scan-converter, the other to the "smooth" one. The current renderer can be set through the new function FT_Set_Renderer. The old raster-related function FT_Set_Raster, FT_Get_Raster and FT_Set_Raster_Mode have now disappeared, in favor of the new: FT_Get_Renderer FT_Set_Renderer see the file <freetype/ftrender.h> for more details.. These changes were necessary to properly support different scalable formats in the future, like bi-color glyphs, etc.. - glyph loader object: A new internal object, called a 'glyph loader' has been introduced in the base layer. It is used by all scalable format font drivers to load glyphs and composites. This object has been created to reduce the code size of each driver, as each one of them basically re-implemented its functionality. See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for more information.. - FT_GlyphSlot had new fields: In order to support extended features (see below), the FT_GlyphSlot structure has a few new fields: linearHoriAdvance: this field gives the linearly scaled (i.e. scaled but unhinted) advance width for the glyph, expressed as a 16.16 fixed pixel value. This is useful to perform WYSIWYG text. linearVertAdvance: this field gives the linearly scaled advance height for the glyph (relevant in vertical glyph layouts only). This is useful to perform WYSIWYG text. Note that the two above field replace the removed "metrics2" field in the glyph slot. advance: this field is a vector that gives the transformed advance for the glyph. By default, it corresponds to the advance width, unless FT_LOAD_VERTICAL_LAYOUT was specified when calling FT_Load_Glyph or FT_Load_Char bitmap_left: this field gives the distance in integer pixels from the current pen position to the left-most pixel of a glyph image WHEN IT IS A BITMAP. It is only valid when the "format" field is set to "ft_glyph_format_bitmap", for example, after calling the new function FT_Render_Glyph. bitmap_top: this field gives the distance in integer pixels from the current pen position (located on the baseline) to the top-most pixel of the glyph image WHEN IT IS A BITMAP. Positive values correspond to upwards Y. loader: this is a new private field for the glyph slot. Client applications should not touch it.. - support for transforms and direct rendering in FT_Load_Glyph: Most of the functionality found in <freetype/ftglyph.h> has been moved to the core library. Hence, the following: - a transform can be specified for a face through FT_Set_Transform. this transform is applied by FT_Load_Glyph to scalable glyph images (i.e. NOT TO BITMAPS) before the function returns, unless the bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags.. - once a glyph image has been loaded, it can be directly converted to a bitmap by using the new FT_Render_Glyph function. Note that this function takes the glyph image from the glyph slot, and converts it to a bitmap whose properties are returned in "face.glyph.bitmap", "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original native image might be lost after the conversion. - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph and FT_Load_Char functions will call FT_Render_Glyph automatically when needed.
2000-06-22 02:17:42 +02:00
FT_ERRORDEF( FT_Err_Invalid_Version, 0x0038, "invalid FreeType version" )
FT_ERRORDEF( FT_Err_Lower_Module_Version, 0x0039, "module version is too low" )
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Unavailable_Outline, 0x0040, "unavailable outline" )
FT_ERRORDEF( FT_Err_Unavailable_Bitmap, 0x0041, "unavailable bitmap" )
FT_ERRORDEF( FT_Err_File_Is_Not_Collection, 0x0042, "file is not a font collection" )
FT_ERRORDEF( FT_Err_Too_Many_Drivers, 0x0043, "too many modules" )
FT_ERRORDEF( FT_Err_Too_Many_Glyph_Formats, 0x0044, "too many glyph formats" )
FT_ERRORDEF( FT_Err_Too_Many_Extensions, 0x0045, "too many extensions" )
FT_ERRORDEF( FT_Err_Out_Of_Memory, 0x0050, "out of memory" )
FT_ERRORDEF( FT_Err_Unlisted_Object, 0x0051, "unlisted object" )
FT_ERRORDEF( FT_Err_Invalid_Stream_Handle, 0x0060, "invalid stream handle" )
FT_ERRORDEF( FT_Err_Cannot_Open_Stream, 0x0061, "cannot open stream" )
FT_ERRORDEF( FT_Err_Invalid_Stream_Seek, 0x0062, "invalid stream seek" )
FT_ERRORDEF( FT_Err_Invalid_Stream_Skip, 0x0063, "invalid stream skip" )
FT_ERRORDEF( FT_Err_Invalid_Stream_Read, 0x0064, "invalid stream read" )
FT_ERRORDEF( FT_Err_Invalid_Stream_Operation, 0x0065, "invalid stream operation" )
FT_ERRORDEF( FT_Err_Invalid_Frame_Operation, 0x0066, "invalid frame operation" )
FT_ERRORDEF( FT_Err_Nested_Frame_Access, 0x0067, "nested frame access" )
FT_ERRORDEF( FT_Err_Invalid_Frame_Read, 0x0068, "invalid frame read" )
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Too_Many_Points, 0x0070, "too many points in glyph" )
FT_ERRORDEF( FT_Err_Too_Many_Contours, 0x0071, "too many contours in glyph" )
FT_ERRORDEF( FT_Err_Invalid_Composite, 0x0072, "invalid composite glyph" )
FT_ERRORDEF( FT_Err_Too_Many_Hints, 0x0073, "too many hints in glyph" )
FT_ERRORDEF( FT_Err_Too_Many_Edges, 0x0074, "too many edges in glyph" )
FT_ERRORDEF( FT_Err_Too_Many_Strokes, 0x0075, "too many strokes in glyph" )
/* range 0x400 - 0x4FF is reserved for TrueType specific stuff */
/* range 0x500 - 0x5FF is reserved for TrueDoc specific stuff */
/* range 0x600 - 0x6FF is reserved for Type1 specific stuff */
2000-05-17 01:44:38 +02:00
FT_ERRORDEF( FT_Err_Raster_Uninitialized, 0x0080, "raster uninitialized" )
FT_ERRORDEF( FT_Err_Raster_Corrupted, 0x0081, "raster corrupted !!" )
FT_ERRORDEF( FT_Err_Raster_Overflow, 0x0082, "raster overflow !!" )
#ifdef FT_ERROR_END_LIST
FT_ERROR_END_LIST
#endif
#undef FT_ERROR_START_LIST
#undef FT_ERROR_END_LIST
#undef FT_ERRORDEF
#endif /* FTERRORS_H */
/* END */