About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ttobjs.c File Reference
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h>
#include <freetype/tttags.h>
#include <freetype/internal/sfnt.h>
#include <freetype/ftdriver.h>
#include "ttgload.h"
#include "ttpload.h"
#include "tterrors.h"
Include dependency graph for ttobjs.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  tt_sfnt_id_rec_


#define FT_COMPONENT   ttobjs
#define TRICK_NAMES_COUNT   26
#define TRICK_SFNT_ID_cvt   0
#define TRICK_SFNT_ID_fpgm   1
#define TRICK_SFNT_ID_prep   2


typedef struct tt_sfnt_id_rec_ tt_sfnt_id_rec


static FT_Bool tt_check_trickyness_family (const FT_String *name)
static FT_UInt32 tt_synth_sfnt_checksum (FT_Stream stream, FT_ULong length)
static FT_ULong tt_get_sfnt_checksum (TT_Face face, FT_UShort i)
static FT_Bool tt_check_trickyness_sfnt_ids (TT_Face face)
static FT_Bool tt_check_trickyness (FT_Face face)
static FT_Bool tt_check_single_notdef (FT_Face ttface)
 tt_face_init (FT_Stream stream, FT_Face ttface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
 tt_face_done (FT_Face ttface)
 tt_size_init (FT_Size ttsize)
 tt_size_done (FT_Size ttsize)
 tt_size_reset (TT_Size size, FT_Bool only_height)
 tt_driver_init (FT_Module ttdriver)
 tt_driver_done (FT_Module ttdriver)
 tt_slot_init (FT_GlyphSlot slot)

Macro Definition Documentation


#define FT_COMPONENT   ttobjs


Objects manager (body).

Copyright (C) 1996-2020 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. 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.

Definition at line 45 of file ttobjs.c.


#define TRICK_NAMES_COUNT   26




#define TRICK_SFNT_ID_cvt   0


#define TRICK_SFNT_ID_fpgm   1


#define TRICK_SFNT_ID_prep   2





Typedef Documentation

◆ tt_sfnt_id_rec

Function Documentation

◆ tt_check_single_notdef()

static FT_Bool tt_check_single_notdef ( FT_Face  ttface)

◆ tt_check_trickyness()

static FT_Bool tt_check_trickyness ( FT_Face  face)

◆ tt_check_trickyness_family()

static FT_Bool tt_check_trickyness_family ( const FT_String name)

Definition at line 150 of file ttobjs.c.


Referenced by tt_check_trickyness().

◆ tt_check_trickyness_sfnt_ids()

◆ tt_driver_done()

tt_driver_done ( FT_Module  ttdriver)

@Function: tt_driver_done

@Description: Finalize a given TrueType driver.

@Input: driver :: A handle to the target TrueType driver.

Definition at line 1448 of file ttobjs.c.

References FT_UNUSED.

◆ tt_driver_init()

tt_driver_init ( FT_Module  ttdriver)

@Function: tt_driver_init

@Description: Initialize a given TrueType driver object.

@Input: driver :: A handle to the target driver object.

@Return: FreeType error code. 0 means success.

Definition at line 1410 of file ttobjs.c.


◆ tt_face_done()

tt_face_done ( FT_Face  ttface)

@Function: tt_face_done

@Description: Finalize a given face object.

@Input: face :: A pointer to the face object to destroy.

Definition at line 768 of file ttobjs.c.

References face, FT_FRAME_RELEASE, FT_FREE, if, NULL, sfnt, tt_face_done_loca(), and tt_face_free_hdmx().

◆ tt_face_init()

tt_face_init ( FT_Stream  stream,
FT_Face  ttface,
FT_Int  face_index,
FT_Int  num_params,
FT_Parameter params 

@Function: tt_face_init

@Description: Initialize a given TrueType face object.

@Input: stream :: The source font stream.

face_index :: The index of the TrueType font, if we are opening a collection, in bits 0-15. The numbered instance index~+~1 of a GX (sub)font, if applicable, in bits 16-30.

num_params :: Number of additional generic parameters. Ignored.

params :: Additional generic parameters. Ignored.

@InOut: face :: The newly built face object.

@Return: FreeType error code. 0 means success.

Definition at line 605 of file ttobjs.c.

References error, Exit(), face, FT_ERR_EQ, FT_ERR_NEQ, FT_Err_Ok, FT_ERROR, FT_FACE_FLAG_HINTER, FT_FACE_FLAG_TRICKY, FT_Get_Module_Interface(), FT_HAS_MULTIPLE_MASTERS, FT_IS_SCALABLE, FT_STREAM_SEEK, FT_THROW, FT_TRACE2, FT_TRACE5, library, params, sfnt, FT_FaceRec_::stream, tt_check_single_notdef(), tt_check_trickyness(), tt_face_load_cvt(), tt_face_load_fpgm(), tt_face_load_hdmx(), tt_face_load_loca(), tt_face_load_prep(), TT_Init_Glyph_Loading(), TTAG_0xA5kbd, TTAG_0xA5lst, and TTAG_true.

◆ tt_get_sfnt_checksum()

static FT_ULong tt_get_sfnt_checksum ( TT_Face  face,
FT_UShort  i 

Definition at line 246 of file ttobjs.c.

References face, i, NULL, FT_FaceRec_::stream, and tt_synth_sfnt_checksum().

Referenced by tt_check_trickyness_sfnt_ids().

◆ tt_size_done()

tt_size_done ( FT_Size  ttsize)

@Function: tt_size_done

@Description: The TrueType size object finalizer.

@Input: size :: A handle to the target size object.

Definition at line 1270 of file ttobjs.c.

References FALSE, and size.

◆ tt_size_init()

tt_size_init ( FT_Size  ttsize)

SIZE FUNCTIONS @Function: tt_size_init

@Description: Initialize a new TrueType size object.

@InOut: size :: A handle to the size object.

@Return: FreeType error code. 0 means success.

Definition at line 1239 of file ttobjs.c.

References error, FALSE, FT_Err_Ok, and size.

◆ tt_size_reset()

tt_size_reset ( TT_Size  size,
FT_Bool  only_height 

@Function: tt_size_reset

@Description: Reset a TrueType size when resolutions and character dimensions have been changed.

@Input: size :: A handle to the target size object.

only_height :: Only recompute ascender, descender, and height; this flag is used for variation fonts where ‘tt_size_reset’ is used as an iterator function.

Definition at line 1302 of file ttobjs.c.

References FT_FaceRec_::ascender, FT_Size_Metrics_::ascender, FT_FaceRec_::descender, FT_Size_Metrics_::descender, face, FALSE, FT_DivFix(), FT_Err_Ok, FT_MulFix(), FT_PIX_ROUND, FT_THROW, FT_FaceRec_::height, FT_Size_Metrics_::height, if, FT_Size_Metrics_::max_advance, FT_FaceRec_::max_advance_width, size, TRUE, FT_FaceRec_::units_per_EM, FT_Size_Metrics_::x_ppem, FT_Size_Metrics_::x_scale, FT_Size_Metrics_::y_ppem, and FT_Size_Metrics_::y_scale.

Referenced by tt_size_request().

◆ tt_slot_init()

tt_slot_init ( FT_GlyphSlot  slot)

@Function: tt_slot_init

@Description: Initialize a new slot object.

@InOut: slot :: A handle to the slot object.

@Return: FreeType error code. 0 means success.

Definition at line 1470 of file ttobjs.c.

References FT_GlyphLoader_CreateExtra(), and slot.

◆ tt_synth_sfnt_checksum()

static FT_UInt32 tt_synth_sfnt_checksum ( FT_Stream  stream,
FT_ULong  length 

Definition at line 220 of file ttobjs.c.

References checksum, error, FT_FRAME_ENTER, FT_FRAME_EXIT, FT_GET_BYTE, FT_GET_ULONG, i, and length.

Referenced by tt_get_sfnt_checksum().