/**************************************************************************** * * ttpload.c * * TrueType-specific tables loader (body). * * Copyright (C) 1996-2023 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. * */ #include <freetype/internal/ftdebug.h> #include <freetype/internal/ftobjs.h> #include <freetype/internal/ftstream.h> #include <freetype/tttags.h> #include "ttpload.h" #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT #include "ttgxvar.h" #endif #include "tterrors.h" /************************************************************************** * * The macro FT_COMPONENT is used in trace mode. It is an implicit * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log * messages during execution. */ #undef FT_COMPONENT #define FT_COMPONENT … /************************************************************************** * * @Function: * tt_face_load_loca * * @Description: * Load the locations table. * * @InOut: * face :: * A handle to the target face object. * * @Input: * stream :: * The input stream. * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) tt_face_load_loca( TT_Face face, FT_Stream stream ) { … } FT_LOCAL_DEF( FT_ULong ) tt_face_get_location( FT_Face face, /* TT_Face */ FT_UInt gindex, FT_ULong *asize ) { … } FT_LOCAL_DEF( void ) tt_face_done_loca( TT_Face face ) { … } /************************************************************************** * * @Function: * tt_face_load_cvt * * @Description: * Load the control value table into a face object. * * @InOut: * face :: * A handle to the target face object. * * @Input: * stream :: * A handle to the input stream. * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) tt_face_load_cvt( TT_Face face, FT_Stream stream ) { … } /************************************************************************** * * @Function: * tt_face_load_fpgm * * @Description: * Load the font program. * * @InOut: * face :: * A handle to the target face object. * * @Input: * stream :: * A handle to the input stream. * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) tt_face_load_fpgm( TT_Face face, FT_Stream stream ) { … } /************************************************************************** * * @Function: * tt_face_load_prep * * @Description: * Load the cvt program. * * @InOut: * face :: * A handle to the target face object. * * @Input: * stream :: * A handle to the input stream. * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) tt_face_load_prep( TT_Face face, FT_Stream stream ) { … } FT_COMPARE_DEF( int ) compare_ppem( const void* a, const void* b ) { … } /************************************************************************** * * @Function: * tt_face_load_hdmx * * @Description: * Load the `hdmx' table into the face object. * * @Input: * face :: * A handle to the target face object. * * stream :: * A handle to the input stream. * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) tt_face_load_hdmx( TT_Face face, FT_Stream stream ) { … } FT_LOCAL_DEF( void ) tt_face_free_hdmx( TT_Face face ) { … } /************************************************************************** * * Return the advance width table for a given pixel size if it is found * in the font's `hdmx' table (if any). The records must be sorted for * the binary search to work properly. */ FT_LOCAL_DEF( FT_Byte* ) tt_face_get_device_metrics( TT_Face face, FT_UInt ppem, FT_UInt gindex ) { … } /* END */