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)  

cffdrivr.c File Reference
#include <freetype/freetype.h>
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h>
#include <freetype/internal/sfnt.h>
#include <freetype/internal/psaux.h>
#include <freetype/internal/ftpsprop.h>
#include <freetype/internal/services/svcid.h>
#include <freetype/internal/services/svpsinfo.h>
#include <freetype/internal/services/svpostnm.h>
#include <freetype/internal/services/svttcmap.h>
#include <freetype/internal/services/svcfftl.h>
#include "cffdrivr.h"
#include "cffgload.h"
#include "cffload.h"
#include "cffcmap.h"
#include "cffparse.h"
#include "cffobjs.h"
#include "cfferrs.h"
#include <freetype/internal/services/svfntfmt.h>
#include <freetype/internal/services/svgldict.h>
#include <freetype/internal/services/svprop.h>
#include <freetype/ftdriver.h>
Include dependency graph for cffdrivr.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define FT_COMPONENT   cffdriver
#define CFF_SIZE_SELECT   0


 cff_get_kerning (FT_Face ttface, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
 cff_glyph_load (FT_GlyphSlot cffslot, FT_Size cffsize, FT_UInt glyph_index, FT_Int32 load_flags)
 cff_get_advances (FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
static FT_Error cff_get_glyph_name (CFF_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
static FT_UInt cff_get_name_index (CFF_Face face, const FT_String *glyph_name)
 FT_DEFINE_SERVICE_GLYPHDICTREC (cff_service_glyph_dict,(FT_GlyphDict_GetNameFunc) cff_get_glyph_name,(FT_GlyphDict_NameIndexFunc) cff_get_name_index) static FT_Int cff_ps_has_glyph_names(FT_Face face)
static FT_Error cff_ps_get_font_info (CFF_Face face, PS_FontInfoRec *afont_info)
static FT_Error cff_ps_get_font_extra (CFF_Face face, PS_FontExtraRec *afont_extra)
 FT_DEFINE_SERVICE_PSINFOREC (cff_service_ps_info,(PS_GetFontInfoFunc) cff_ps_get_font_info,(PS_GetFontExtraFunc) cff_ps_get_font_extra,(PS_HasGlyphNamesFunc) cff_ps_has_glyph_names,(PS_GetFontPrivateFunc) NULL,(PS_GetFontValueFunc) NULL) static const char *cff_get_ps_name(CFF_Face face)
 FT_DEFINE_SERVICE_PSFONTNAMEREC (cff_service_ps_name,(FT_PsName_GetFunc) cff_get_ps_name) static FT_Error cff_get_cmap_info(FT_CharMap charmap
 if (cmap->clazz !=&cff_cmap_encoding_class_rec &&cmap->clazz !=&cff_cmap_unicode_class_rec)
 FT_DEFINE_SERVICE_TTCMAPSREC (cff_service_get_cmap_info,(TT_CMap_Info_GetFunc) cff_get_cmap_info) static FT_Error cff_get_ros(CFF_Face face
 if (cff)
static FT_Error cff_get_is_cid (CFF_Face face, FT_Bool *is_cid)
static FT_Error cff_get_cid_from_glyph_index (CFF_Face face, FT_UInt glyph_index, FT_UInt *cid)
 FT_DEFINE_SERVICE_CIDREC (cff_service_cid_info,(FT_CID_GetRegistryOrderingSupplementFunc) cff_get_ros,(FT_CID_GetIsInternallyCIDKeyedFunc) cff_get_is_cid,(FT_CID_GetCIDFromGlyphIndexFunc) cff_get_cid_from_glyph_index) FT_DEFINE_SERVICE_PROPERTIESREC(cff_service_properties
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_DEFINE_SERVICE_CFFLOADREC (cff_service_cff_load,(FT_Get_Standard_Encoding_Func) cff_get_standard_encoding,(FT_Load_Private_Dict_Func) cff_load_private_dict,(FT_FD_Select_Get_Func) cff_fd_select_get,(FT_Blend_Check_Vector_Func) cff_blend_check_vector,(FT_Blend_Build_Vector_Func) cff_blend_build_vector) FT_DEFINE_SERVICEDESCREC8(cff_services
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get &cff_service_cff_load cff_get_interface (FT_Module driver, const char *module_interface)


FT_Error error = FT_Err_Ok
FT_Face face = FT_CMAP_FACE( cmap )
FT_Library library = FT_FACE_LIBRARY( face )
const char ** registry
const char const char ** ordering
const char const char FT_Intsupplement
CFF_Font cff = (CFF_Font)face->extra.data
Fail __pad0__
FT_Properties_SetFunc ps_property_set
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_FONT_FORMAT
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_FONT_FORMAT_CFF
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_INFO
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_ps_info
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_ps_name
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_GLYPH_DICT
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_glyph_dict
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_TT_CMAP
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_get_cmap_info
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CID
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_cid_info
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_PROPERTIES
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_getcff_service_properties
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CFF_LOAD

Macro Definition Documentation


#define CFF_SIZE_SELECT   0

Definition at line 1120 of file cffdrivr.c.


#define FT_COMPONENT   cffdriver


OpenType font driver implementation (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 58 of file cffdrivr.c.

Function Documentation

◆ cff_get_advances()

◆ cff_get_cid_from_glyph_index()

◆ cff_get_glyph_name()

◆ cff_get_interface()

FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_cff_load cff_get_interface ( FT_Module  driver,
const char *  module_interface 

◆ cff_get_is_cid()

static FT_Error cff_get_is_cid ( CFF_Face  face,
FT_Bool is_cid 

◆ cff_get_kerning()

cff_get_kerning ( FT_Face  ttface,
FT_UInt  left_glyph,
FT_UInt  right_glyph,
FT_Vector kerning 

@Function: cff_get_kerning

@Description: A driver method used to return the kerning vector between two glyphs of the same face.

@Input: face :: A handle to the source face object.

left_glyph :: The index of the left glyph in the kern pair.

right_glyph :: The index of the right glyph in the kern pair.

@Output: kerning :: The kerning vector. This is in font units for scalable formats, and in pixels for fixed-sizes formats.

@Return: FreeType error code. 0 means success.

@Note: Only horizontal layouts (left-to-right & right-to-left) are supported by this function. Other layouts, or more sophisticated kernings, are out of scope of this method (the basic driver interface is meant to be simple).

They can be implemented by format-specific interfaces.

Definition at line 111 of file cffdrivr.c.

References face, FT_Err_Ok, if(), kerning, left_glyph, right_glyph, FT_Vector_::x, and FT_Vector_::y.

◆ cff_get_name_index()

◆ cff_glyph_load()

cff_glyph_load ( FT_GlyphSlot  cffslot,
FT_Size  cffsize,
FT_UInt  glyph_index,
FT_Int32  load_flags 

@Function: cff_glyph_load

@Description: A driver method used to load a glyph within a given glyph slot.

@Input: slot :: A handle to the target slot object where the glyph will be loaded.

size :: A handle to the source face size at which the glyph must be scaled, loaded, etc.

glyph_index :: The index of the glyph in the font file.

load_flags :: A flag indicating what to load for this glyph. The FT_LOAD_??? constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).

@Return: FreeType error code. 0 means success.

Definition at line 161 of file cffdrivr.c.

References cff_slot_load(), error, FT_LOAD_NO_HINTING, FT_LOAD_NO_SCALE, FT_THROW, FT_TRACE1, glyph_index, NULL, size, and slot.

◆ cff_ps_get_font_extra()

◆ cff_ps_get_font_info()


FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_DEFINE_SERVICE_CFFLOADREC ( cff_service_cff_load  ,
(FT_Get_Standard_Encoding_Func cff_get_standard_encoding,
(FT_Load_Private_Dict_Func cff_load_private_dict,
(FT_FD_Select_Get_Func cff_fd_select_get,
(FT_Blend_Check_Vector_Func cff_blend_check_vector,
(FT_Blend_Build_Vector_Func cff_blend_build_vector 


FT_DEFINE_SERVICE_CIDREC ( cff_service_cid_info  ,
(FT_CID_GetRegistryOrderingSupplementFunc cff_get_ros,
(FT_CID_GetIsInternallyCIDKeyedFunc cff_get_is_cid,
(FT_CID_GetCIDFromGlyphIndexFunc cff_get_cid_from_glyph_index 


FT_DEFINE_SERVICE_GLYPHDICTREC ( cff_service_glyph_dict  ,
(FT_GlyphDict_GetNameFunc cff_get_glyph_name,
(FT_GlyphDict_NameIndexFunc cff_get_name_index 

Definition at line 446 of file cffdrivr.c.

References face, FT_FaceRec_::face_flags, and FT_FACE_FLAG_GLYPH_NAMES.


FT_DEFINE_SERVICE_PSFONTNAMEREC ( cff_service_ps_name  ,
(FT_PsName_GetFunc cff_get_ps_name 


FT_DEFINE_SERVICE_PSINFOREC ( cff_service_ps_info  ,
(PS_GetFontInfoFunc cff_ps_get_font_info,
(PS_GetFontExtraFunc cff_ps_get_font_extra,
(PS_HasGlyphNamesFunc cff_ps_has_glyph_names,
(PS_GetFontPrivateFunc NULL,
(PS_GetFontValueFunc NULL 
) const


FT_DEFINE_SERVICE_TTCMAPSREC ( cff_service_get_cmap_info  ,
(TT_CMap_Info_GetFunc cff_get_cmap_info 

◆ if() [1/2]

◆ if() [2/2]

if ( cmap->clazz !   = &cff_cmap_encoding_class_rec && cmap->clazz != &cff_cmap_unicode_class_rec)

Variable Documentation

◆ __pad0__

Fail __pad0__

Definition at line 746 of file cffdrivr.c.

◆ cff

Definition at line 701 of file cffdrivr.c.

◆ cff_service_cid_info

Definition at line 1055 of file cffdrivr.c.

◆ cff_service_get_cmap_info

Definition at line 1054 of file cffdrivr.c.

◆ cff_service_glyph_dict

Definition at line 1053 of file cffdrivr.c.

◆ cff_service_properties

Definition at line 1056 of file cffdrivr.c.

◆ cff_service_ps_info

Definition at line 1051 of file cffdrivr.c.

◆ cff_service_ps_name

Definition at line 1052 of file cffdrivr.c.

◆ cmap_info

TT_CMapInfo* cmap_info
Initial value:
#define FT_CMAP(x)
Definition: ftobjs.h:157
TT_CharMap cmap
Definition: ttf2pfb.c:163

Definition at line 654 of file cffdrivr.c.

◆ error

return error ( void  msg) = FT_Err_Ok

Definition at line 657 of file cffdrivr.c.

◆ face

Definition at line 659 of file cffdrivr.c.


Definition at line 1050 of file cffdrivr.c.


Definition at line 1057 of file cffdrivr.c.


Definition at line 1055 of file cffdrivr.c.


Definition at line 1050 of file cffdrivr.c.


Definition at line 1053 of file cffdrivr.c.


FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME

Definition at line 1052 of file cffdrivr.c.


Definition at line 1051 of file cffdrivr.c.


Definition at line 1056 of file cffdrivr.c.


Definition at line 1054 of file cffdrivr.c.

◆ library

Definition at line 660 of file cffdrivr.c.

◆ ordering

const char const char* * ordering

Definition at line 697 of file cffdrivr.c.

◆ ps_property_set

FT_Properties_SetFunc ps_property_set

Definition at line 834 of file cffdrivr.c.

◆ registry

const char* * registry

Definition at line 696 of file cffdrivr.c.

◆ supplement

const char const char FT_Int* supplement
Initial value:
int FT_Error
Definition: fttypes.h:299
return FT_Err_Ok
Definition: ftbbox.c:526
FT_Error error
Definition: cffdrivr.c:657

Definition at line 698 of file cffdrivr.c.