Name Description Size
config
freetype.h @section: preamble @title: Preamble @abstract: What FreeType is and isn't @description: FreeType is a library that provides access to glyphs in font files. It scales the glyph images and their metrics to a requested size, and it rasterizes the glyph images to produce pixel or subpixel alpha coverage bitmaps. Note that FreeType is _not_ a text layout engine. You have to use higher-level libraries like HarfBuzz, Pango, or ICU for that. Note also that FreeType does _not_ perform alpha blending or compositing the resulting bitmaps or pixmaps by itself. Use your favourite graphics library (for example, Cairo or Skia) to further process FreeType's output. 177200
ftadvanc.h @section: quick_advance @title: Quick retrieval of advance values @abstract: Retrieve horizontal and vertical advance values without processing glyph outlines, if possible. @description: This section contains functions to quickly extract advance values without handling glyph outlines, if possible. @order: FT_Get_Advance FT_Get_Advances 5470
ftbbox.h This component has a _single_ role: to compute exact outline bounding boxes. It is separated from the rest of the engine for various technical reasons. It may well be integrated in 'ftoutln' later. 2638
ftbdf.h @section: bdf_fonts @title: BDF and PCF Files @abstract: BDF and PCF specific API. @description: This section contains the declaration of functions specific to BDF and PCF fonts. 5322
ftbitmap.h @section: bitmap_handling @title: Bitmap Handling @abstract: Handling FT_Bitmap objects. @description: This section contains functions for handling @FT_Bitmap objects, automatically adjusting the target's bitmap buffer size as needed. Note that none of the functions changes the bitmap's 'flow' (as indicated by the sign of the `pitch` field in @FT_Bitmap). To set the flow, assign an appropriate positive or negative value to the `pitch` field of the target @FT_Bitmap object after calling @FT_Bitmap_Init but before calling any of the other functions described here. 9051
ftbzip2.h @section: bzip2 @title: BZIP2 Streams @abstract: Using bzip2-compressed font files. @description: In certain builds of the library, bzip2 compression recognition is automatically handled when calling @FT_New_Face or @FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a bzip2 compressed stream from it and re-open the face with it. The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance. This section contains the declaration of Bzip2-specific functions. 2786
ftcache.h 34179
ftchapters.h This file defines the structure of the FreeType reference. It is used by the python script that generates the HTML files. 2933
ftcid.h @section: cid_fonts @title: CID Fonts @abstract: CID-keyed font-specific API. @description: This section contains the declaration of CID-keyed font-specific functions. 4022
ftcolor.h @section: color_management @title: Glyph Color Management @abstract: Retrieving and manipulating OpenType's 'CPAL' table data. @description: The functions described here allow access and manipulation of color palette entries in OpenType's 'CPAL' tables. 50199
ftdriver.h @section: auto_hinter @title: The auto-hinter @abstract: Controlling the auto-hinting module. @description: While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with @FT_Property_Set and @FT_Property_Get. The following lists the available properties together with the necessary macros and structures. Note that the auto-hinter's module name is 'autofitter' for historical reasons. Available properties are @increase-x-height, @no-stem-darkening (experimental), @darkening-parameters (experimental), @glyph-to-script-map (experimental), @fallback-script (experimental), and @default-script (experimental), as documented in the @properties section. 50576
fterrdef.h @section: error_code_values @title: Error Code Values @abstract: All possible error codes returned by FreeType functions. @description: The list below is taken verbatim from the file `fterrdef.h` (loaded automatically by including `FT_FREETYPE_H`). The first argument of the `FT_ERROR_DEF_` macro is the error label; by default, the prefix `FT_Err_` gets added so that you get error names like `FT_Err_Cannot_Open_Resource`. The second argument is the error code, and the last argument an error string, which is not used by FreeType. Within your application you should **only** use error names and **never** its numeric values! The latter might (and actually do) change in forthcoming FreeType versions. Macro `FT_NOERRORDEF_` defines `FT_Err_Ok`, which is always zero. See the 'Error Enumerations' subsection how to automatically generate a list of error strings. 12559
fterrors.h @section: error_enumerations @title: Error Enumerations @abstract: How to handle errors and error strings. @description: The header file `fterrors.h` (which is automatically included by `freetype.h`) defines the handling of FreeType's enumeration constants. It can also be used to generate error message strings with a small macro trick explained below. **Error Formats** The configuration macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` can be defined in `ftoption.h` in order to make the higher byte indicate the module where the error has happened (this is not compatible with standard builds of FreeType~2, however). See the file `ftmoderr.h` for more details. **Error Message Strings** Error definitions are set up with special macros that allow client applications to build a table of error message strings. The strings are not included in a normal build of FreeType~2 to save space (most client applications do not use them). To do so, you have to define the following macros before including this file. ``` FT_ERROR_START_LIST ``` This macro is called before anything else to define the start of the error list. It is followed by several `FT_ERROR_DEF` calls. ``` FT_ERROR_DEF( e, v, s ) ``` This macro is called to define one single error. 'e' is the error code identifier (e.g., `Invalid_Argument`), 'v' is the error's numerical value, and 's' is the corresponding error string. ``` FT_ERROR_END_LIST ``` This macro ends the list. Additionally, you have to undefine `FTERRORS_H_` before #including this file. Here is a simple example. ``` #undef FTERRORS_H_ #define FT_ERRORDEF( e, v, s ) { e, s }, #define FT_ERROR_START_LIST { #define FT_ERROR_END_LIST { 0, NULL } }; const struct { int err_code; const char* err_msg; } ft_errors[] = #include <freetype/fterrors.h> ``` An alternative to using an array is a switch statement. ``` #undef FTERRORS_H_ #define FT_ERROR_START_LIST switch ( error_code ) { #define FT_ERRORDEF( e, v, s ) case v: return s; #define FT_ERROR_END_LIST } ``` If you use `FT_CONFIG_OPTION_USE_MODULE_ERRORS`, `error_code` should be replaced with `FT_ERROR_BASE(error_code)` in the last example. 9301
ftfntfmt.h @section: font_formats @title: Font Formats @abstract: Getting the font format. @description: The single function in this section can be used to get the font format. Note that this information is not needed normally; however, there are special cases (like in PDF devices) where it is important to differentiate, in spite of FreeType's uniform API. 2213
ftgasp.h @section: gasp_table @title: Gasp Table @abstract: Retrieving TrueType 'gasp' table entries. @description: The function @FT_Get_Gasp can be used to query a TrueType or OpenType font for specific entries in its 'gasp' table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results. 4138
ftglyph.h This file contains the definition of several convenience functions that can be used by client applications to easily retrieve glyph bitmaps and outlines from a given face. These functions should be optional if you are writing a font server or text layout engine on top of FreeType. However, they are pretty handy for many other simple uses of the library. 20912
ftgxval.h gxvalid is derived from both gxlayout module and otvalid module. Development of gxlayout is supported by the Information-technology Promotion Agency(IPA), Japan. 10625
ftgzip.h @section: gzip @title: GZIP Streams @abstract: Using gzip-compressed font files. @description: In certain builds of the library, gzip compression recognition is automatically handled when calling @FT_New_Face or @FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a gzipped stream from it and re-open the face with it. The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance. This section contains the declaration of Gzip-specific functions. 4211
ftimage.h Note: A 'raster' is simply a scan-line converter, used to render `FT_Outline`s into `FT_Bitmap`s. Note: This file can be used for `STANDALONE_` compilation of raster (B/W) and smooth (anti-aliased) renderers. Therefore, it must rely on standard variable types only instead of aliases in `fttypes.h`. 42150
ftincrem.h @section: incremental @title: Incremental Loading @abstract: Custom Glyph Loading. @description: This section contains various functions used to perform so-called 'incremental' glyph loading. This is a mode where all glyphs loaded from a given @FT_Face are provided by the client application. Apart from that, all other tables are loaded normally from the font file. This mode is useful when FreeType is used within another engine, e.g., a PostScript Imaging Processor. To enable this mode, you must use @FT_Open_Face, passing an @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an @FT_Incremental_Interface value. See the comments for @FT_Incremental_InterfaceRec for an example. 10696
ftlcdfil.h 11744
ftlist.h This file implements functions relative to list processing. Its data structures are defined in `freetype.h`. 7100
ftlogging.h @section: debugging_apis @title: External Debugging APIs @abstract: Public APIs to control the `FT_DEBUG_LOGGING` macro. @description: This section contains the declarations of public functions that enables fine control of what the `FT_DEBUG_LOGGING` macro outputs. 4130
ftlzw.h @section: lzw @title: LZW Streams @abstract: Using LZW-compressed font files. @description: In certain builds of the library, LZW compression recognition is automatically handled when calling @FT_New_Face or @FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a LZW stream from it and re-open the face with it. The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance. This section contains the declaration of LZW-specific functions. 2768
ftmac.h NOTE: Include this file after `FT_FREETYPE_H` and after any Mac-specific headers (because this header uses Mac types such as 'Handle', 'FSSpec', 'FSRef', etc.) 7771
ftmm.h @section: multiple_masters @title: Multiple Masters @abstract: How to manage Multiple Masters fonts. @description: The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates. Besides Adobe MM fonts, the interface supports Apple's TrueType GX and OpenType variation fonts. Some of the routines only work with Adobe MM fonts, others will work with all three types. They are similar enough that a consistent interface makes sense. For Adobe MM fonts, macro @FT_IS_SFNT returns false. For GX and OpenType variation fonts, it returns true. 24595
ftmodapi.h @section: module_management @title: Module Management @abstract: How to add, upgrade, remove, and control modules from FreeType. @description: The definitions below are used to manage modules within FreeType. Internal and external modules can be added, upgraded, and removed at runtime. For example, an alternative renderer or proprietary font driver can be registered and prioritized. Additionally, some module properties can also be controlled. Here is a list of existing values of the `module_name` field in the @FT_Module_Class structure. ``` autofitter bdf cff gxvalid otvalid pcf pfr psaux pshinter psnames raster1 sfnt smooth truetype type1 type42 t1cid winfonts ``` Note that the FreeType Cache sub-system is not a FreeType module. @order: FT_Module FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_Module_Class FT_Add_Module FT_Get_Module FT_Remove_Module FT_Add_Default_Modules FT_FACE_DRIVER_NAME FT_Property_Set FT_Property_Get FT_Set_Default_Properties FT_New_Library FT_Done_Library FT_Reference_Library FT_Renderer FT_Renderer_Class FT_Get_Renderer FT_Set_Renderer FT_Set_Debug_Hook 22544
ftmoderr.h This file is used to define the FreeType module error codes. If the macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` in `ftoption.h` is set, the lower byte of an error value identifies the error code as usual. In addition, the higher byte identifies the module. For example, the error `FT_Err_Invalid_File_Format` has value 0x0003, the error `TT_Err_Invalid_File_Format` has value 0x1303, the error `T1_Err_Invalid_File_Format` has value 0x1403, etc. Note that `FT_Err_Ok`, `TT_Err_Ok`, etc. are always equal to zero, including the high byte. If `FT_CONFIG_OPTION_USE_MODULE_ERRORS` isn't set, the higher byte of an error value is set to zero. To hide the various `XXX_Err_` prefixes in the source code, FreeType provides some macros in `fttypes.h`. FT_ERR( err ) Add current error module prefix (as defined with the `FT_ERR_PREFIX` macro) to `err`. For example, in the BDF module the line ``` error = FT_ERR( Invalid_Outline ); ``` expands to ``` error = BDF_Err_Invalid_Outline; ``` For simplicity, you can always use `FT_Err_Ok` directly instead of `FT_ERR( Ok )`. FT_ERR_EQ( errcode, err ) FT_ERR_NEQ( errcode, err ) Compare error code `errcode` with the error `err` for equality and inequality, respectively. Example: ``` if ( FT_ERR_EQ( error, Invalid_Outline ) ) ... ``` Using this macro you don't have to think about error prefixes. Of course, if module errors are not active, the above example is the same as ``` if ( error == FT_Err_Invalid_Outline ) ... ``` FT_ERROR_BASE( errcode ) FT_ERROR_MODULE( errcode ) Get base error and module error code, respectively. It can also be used to create a module error message table easily with something like ``` #undef FTMODERR_H_ #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, #define FT_MODERR_START_LIST { #define FT_MODERR_END_LIST { 0, 0 } }; const struct { int mod_err_offset; const char* mod_err_msg } ft_mod_errors[] = #include <freetype/ftmoderr.h> ``` 6675
ftotval.h Warning: This module might be moved to a different library in the future to avoid a tight dependency between FreeType and the OpenType specification. 5346
ftoutln.h @section: outline_processing @title: Outline Processing @abstract: Functions to create, transform, and render vectorial glyph images. @description: This section contains routines used to create and destroy scalable glyph images known as 'outlines'. These can also be measured, transformed, and converted into bitmaps and pixmaps. @order: FT_Outline FT_Outline_New FT_Outline_Done FT_Outline_Copy FT_Outline_Translate FT_Outline_Transform FT_Outline_Embolden FT_Outline_EmboldenXY FT_Outline_Reverse FT_Outline_Check FT_Outline_Get_CBox FT_Outline_Get_BBox FT_Outline_Get_Bitmap FT_Outline_Render FT_Outline_Decompose FT_Outline_Funcs FT_Outline_MoveToFunc FT_Outline_LineToFunc FT_Outline_ConicToFunc FT_Outline_CubicToFunc FT_Orientation FT_Outline_Get_Orientation FT_OUTLINE_XXX 17403
ftparams.h @section: parameter_tags @title: Parameter Tags @abstract: Macros for driver property and font loading parameter tags. @description: This section contains macros for the @FT_Parameter structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType. 6041
ftpfr.h @section: pfr_fonts @title: PFR Fonts @abstract: PFR/TrueDoc-specific API. @description: This section contains the declaration of PFR-specific functions. 4908
ftrender.h @section: module_management 6625
ftsizes.h Typical application would normally not need to use these functions. However, they have been placed in a public API for the rare cases where they are needed. 4288
ftsnames.h @section: sfnt_names @title: SFNT Names @abstract: Access the names embedded in TrueType and OpenType files. @description: The TrueType and OpenType specifications allow the inclusion of a special names table ('name') in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc. The definitions below are used to access them if available. Note that this has nothing to do with glyph names! 7730
ftstroke.h @section: glyph_stroker @title: Glyph Stroker @abstract: Generating bordered and stroked glyphs. @description: This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the 'outside' and/or the 'inside' borders of the stroke. This can be useful to generate 'bordered' glyph, i.e., glyphs displayed with a colored (and anti-aliased) border around their shape. @order: FT_Stroker FT_Stroker_LineJoin FT_Stroker_LineCap FT_StrokerBorder FT_Outline_GetInsideBorder FT_Outline_GetOutsideBorder FT_Glyph_Stroke FT_Glyph_StrokeBorder FT_Stroker_New FT_Stroker_Set FT_Stroker_Rewind FT_Stroker_ParseOutline FT_Stroker_Done FT_Stroker_BeginSubPath FT_Stroker_EndSubPath FT_Stroker_LineTo FT_Stroker_ConicTo FT_Stroker_CubicTo FT_Stroker_GetBorderCounts FT_Stroker_ExportBorder FT_Stroker_GetCounts FT_Stroker_Export 21773
ftsynth.h / /************************************************************************ 4483
ftsystem.h @section: system_interface @title: System Interface @abstract: How FreeType manages memory and i/o. @description: This section contains various definitions related to memory management and i/o access. You need to understand this information if you want to use a custom memory manager or you own i/o streams. 8502
fttrigon.h @section: computations 7411
fttypes.h @section: basic_types @title: Basic Data Types @abstract: The basic data types defined by the library. @description: This section contains the basic data types defined by FreeType~2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section. Note that FreeType does not use floating-point data types. Fractional values are represented by fixed-point integers, with lower bits storing the fractional part. @order: FT_Byte FT_Bytes FT_Char FT_Int FT_UInt FT_Int16 FT_UInt16 FT_Int32 FT_UInt32 FT_Int64 FT_UInt64 FT_Short FT_UShort FT_Long FT_ULong FT_Bool FT_Offset FT_PtrDist FT_String FT_Tag FT_Error FT_Fixed FT_Pointer FT_Pos FT_Vector FT_BBox FT_Matrix FT_FWord FT_UFWord FT_F2Dot14 FT_UnitVector FT_F26Dot6 FT_Data FT_MAKE_TAG FT_Generic FT_Generic_Finalizer FT_Bitmap FT_Pixel_Mode FT_Palette_Mode FT_Glyph_Format FT_IMAGE_TAG 14735
ftwinfnt.h @section: winfnt_fonts @title: Window FNT Files @abstract: Windows FNT-specific API. @description: This section contains the declaration of Windows FNT-specific functions. 7965
internal
otsvg.h @section: svg_fonts @title: OpenType SVG Fonts @abstract: OT-SVG API between FreeType and an external SVG rendering library. @description: This section describes the four hooks necessary to render SVG 'documents' that are contained in an OpenType font's 'SVG~' table. For more information on the implementation, see our standard hooks based on 'librsvg' in the [FreeType Demo Programs](https://gitlab.freedesktop.org/freetype/freetype-demos) repository. 10457
t1tables.h @section: type1_tables @title: Type 1 Tables @abstract: Type~1-specific font tables. @description: This section contains the definition of Type~1-specific tables, including structures related to other PostScript font formats. @order: PS_FontInfoRec PS_FontInfo PS_PrivateRec PS_Private CID_FaceDictRec CID_FaceDict CID_FaceInfoRec CID_FaceInfo FT_Has_PS_Glyph_Names FT_Get_PS_Font_Info FT_Get_PS_Font_Private FT_Get_PS_Font_Value T1_Blend_Flags T1_EncodingType PS_Dict_Keys 21529
ttnameid.h @section: truetype_tables 58769
tttables.h @section: truetype_tables @title: TrueType Tables @abstract: TrueType-specific table types and functions. @description: This section contains definitions of some basic tables specific to TrueType and OpenType as well as some routines used to access and process them. @order: TT_Header TT_HoriHeader TT_VertHeader TT_OS2 TT_Postscript TT_PCLT TT_MaxProfile FT_Sfnt_Tag FT_Get_Sfnt_Table FT_Load_Sfnt_Table FT_Sfnt_Table_Info FT_Get_CMap_Language_ID FT_Get_CMap_Format FT_PARAM_TAG_UNPATENTED_HINTING 25306
tttags.h used by "Keyboard.dfont" on legacy Mac OS X 5145