21#include FT_INTERNAL_DEBUG_H
22#include FT_INTERNAL_STREAM_H
23#include FT_INTERNAL_SFNT_H
24#include FT_INTERNAL_POSTSCRIPT_AUX_H
25#include FT_INTERNAL_POSTSCRIPT_PROPS_H
26#include FT_SERVICE_CID_H
27#include FT_SERVICE_POSTSCRIPT_INFO_H
28#include FT_SERVICE_POSTSCRIPT_NAME_H
29#include FT_SERVICE_TT_CMAP_H
30#include FT_SERVICE_CFF_TABLE_LOAD_H
39#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
40#include FT_SERVICE_MULTIPLE_MASTERS_H
41#include FT_SERVICE_METRICS_VARIATIONS_H
47#include FT_SERVICE_FONT_FORMAT_H
48#include FT_SERVICE_GLYPH_DICT_H
49#include FT_SERVICE_PROPERTIES_H
60#define FT_COMPONENT trace_cffdriver
158 FT_Int32 load_flags )
166 return FT_THROW( Invalid_Slot_Handle );
168 FT_TRACE1((
"cff_glyph_load: glyph index %d\n", glyph_index ));
181 if ( cffsize->face != cffslot->face )
182 return FT_THROW( Invalid_Face_Handle );
219#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
223 return FT_THROW( Unimplemented_Feature );
233 for ( nn = 0; nn <
count; nn++ )
244 FT_TRACE5((
" idx %d: advance height %d font unit%s\n",
247 ah == 1 ?
"" :
"s" ));
253#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
257 return FT_THROW( Unimplemented_Feature );
264 for ( nn = 0; nn <
count; nn++ )
275 FT_TRACE5((
" idx %d: advance width %d font unit%s\n",
278 aw == 1 ?
"" :
"s" ));
289 for ( nn = 0; nn <
count; nn++ )
296 ?
slot->linearVertAdvance
297 :
slot->linearHoriAdvance;
323 if (
font->version_major == 2 )
327 FT_Service_GlyphDict service =
334 if ( service && service->get_name )
342 " cannot get glyph name from a CFF2 font\n"
344 " without the `PSNames' module\n" ));
350 if ( !
font->psnames )
353 " cannot get glyph name from CFF & CEF fonts\n"
355 " without the `PSNames' module\n" ));
361 sid =
font->charset.sids[glyph_index];
382 FT_Service_PsCMaps psnames;
397 FT_Service_GlyphDict service =
404 if ( service && service->name_index )
405 return service->name_index(
FT_FACE(
face ), glyph_name );
409 " cannot get glyph index from a CFF2 font\n"
411 " without the `PSNames' module\n" ));
441 cff_service_glyph_dict,
475 if (
FT_ALLOC( font_info,
sizeof ( *font_info ) ) )
520 if (
FT_ALLOC( font_extra,
sizeof ( *font_extra ) ) )
528 if ( embedded_postscript )
535 if ( ( start_fstype =
ft_strstr( embedded_postscript,
536 "/FSType" ) ) !=
NULL &&
538 sizeof (
"/FSType" ) - 1,
544 for (
s = start_fstype +
sizeof (
"/FSType" ) - 1;
548 if ( *
s >=
'0' && *
s <=
'9' )
560 else if ( *
s !=
' ' && *
s !=
'\n' && *
s !=
'\r' )
614 FT_Service_PsFontName service =
621 if ( service && service->get_ps_font_name )
622 return service->get_ps_font_name(
FT_FACE(
face ) );
661 FT_Service_TTCMaps service =
667 if ( service && service->get_cmap_info )
678 cff_service_get_cmap_info,
734 FT_TRACE1((
"cff_get_ros: too large supplement %d is truncated\n",
809 cff_service_cid_info,
826 cff_service_properties,
832#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
844 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
856 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
867 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
879 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
891 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
902 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
905 return mm->set_instance(
FT_FACE(
face ), instance_index );
910 cff_service_multi_masters,
936 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
946 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
954 cff_service_metrics_variations,
976 cff_service_cff_load,
998#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
999 defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1014#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
1027#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1066#ifdef FT_CONFIG_OPTION_PIC
1079#ifndef FT_CONFIG_OPTION_PIC
1096#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1097#define CFF_SIZE_SELECT cff_size_select
1099#define CFF_SIZE_SELECT 0
return cff_index_get_sid_string(cff, sid)
const char const char ** ordering
static FT_Error cff_get_cid_from_glyph_index(CFF_Face face, FT_UInt glyph_index, FT_UInt *cid)
const char const char FT_Int * supplement
cff_get_advances(FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_PROPERTIES
static FT_Error cff_ps_get_font_extra(CFF_Face face, PS_FontExtraRec *afont_extra)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_TT_CMAP
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_GLYPH_DICT_GET
FT_Properties_SetFunc ps_property_set
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get &CFF_SERVICE_CFF_LOAD_GET cff_get_interface(FT_Module driver, const char *module_interface)
static FT_Error cff_get_glyph_name(CFF_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_CID_INFO_GET
cff_get_kerning(FT_Face ttface, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PS_INFO_GET
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_GET_CMAP_INFO_GET
cff_glyph_load(FT_GlyphSlot cffslot, FT_Size cffsize, FT_UInt glyph_index, FT_Int32 load_flags)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
static FT_Error cff_ps_get_font_info(CFF_Face face, PS_FontInfoRec *afont_info)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CFF_LOAD
static FT_Error cff_get_is_cid(CFF_Face face, FT_Bool *is_cid)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_GLYPH_DICT
static FT_UInt cff_get_name_index(CFF_Face face, FT_String *glyph_name)
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_FONT_FORMAT
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CID
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PROPERTIES_GET
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_INFO
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PS_NAME_GET
cff_slot_load(CFF_GlyphSlot glyph, CFF_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
cff_get_standard_encoding(FT_UInt charcode)
cff_blend_build_vector(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
cff_fd_select_get(CFF_FDSelect fdselect, FT_UInt glyph_index)
cff_index_get_string(CFF_Font font, FT_UInt element)
cff_load_private_dict(CFF_Font font, CFF_SubFont subfont, FT_UInt lenNDV, FT_Fixed *NDV)
cff_blend_check_vector(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
cff_face_done(FT_Face cffface)
cff_slot_done(FT_GlyphSlot slot)
cff_size_init(FT_Size cffsize)
cff_slot_init(FT_GlyphSlot slot)
cff_size_request(FT_Size size, FT_Size_Request req)
cff_driver_done(FT_Module module)
cff_size_done(FT_Size cffsize)
cff_driver_init(FT_Module module)
cff_face_init(FT_Stream stream, FT_Face cffface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
FT_BEGIN_HEADER typedef TT_Face CFF_Face
struct CFF_GlyphSlotRec_ * CFF_GlyphSlot
struct CFF_SizeRec_ * CFF_Size
#define CFF_SERVICE_METRICS_VAR_GET
#define CFF_SERVICE_CFF_LOAD_GET
#define CFF_SERVICE_MULTI_MASTERS_GET
#define CFF_CMAP_ENCODING_CLASS_REC_GET
#define CFF_CMAP_UNICODE_CLASS_REC_GET
struct CFF_FontRec_ * CFF_Font
#define FT_LOAD_VERTICAL_LAYOUT
#define FT_LOAD_ADVANCE_ONLY
#define FT_LOAD_NO_HINTING
#define FT_IS_VARIATION(face)
#define FT_FACE_FLAG_GLYPH_NAMES
#define FT_IS_NAMED_INSTANCE(face)
#define FT_CALLBACK_DEF(x)
#define FT_ERROR(varformat)
#define FT_TRACE5(varformat)
#define FT_TRACE1(varformat)
#define FT_DEFINE_DRIVER( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_, face_object_size_, size_object_size_, slot_object_size_, init_face_, done_face_, init_size_, done_size_, init_slot_, done_slot_, load_glyph_, get_kerning_, attach_file_, get_advances_, request_size_, select_size_)
#define FT_ALLOC(ptr, size)
#define FT_STRCPYN(dst, src, size)
#define FT_MODULE_FONT_DRIVER
#define FT_MODULE_DRIVER_HINTS_LIGHTLY
#define FT_MODULE_DRIVER_HAS_HINTER
FT_Get_Module(FT_Library library, const char *module_name)
#define FT_MODULE_DRIVER_SCALABLE
#define FT_FACE_LIBRARY(x)
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
ps_property_get(FT_Module module, const char *property_name, void *value)
#define FT_DEFINE_SERVICEDESCREC9(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4, serv_id_5, serv_data_5, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8, serv_id_9, serv_data_9)
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
#define FT_DEFINE_SERVICEDESCREC7(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4, serv_id_5, serv_data_5, serv_id_6, serv_data_6, serv_id_7, serv_data_7)
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
#define FT_DEFINE_SERVICEDESCREC8(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4, serv_id_5, serv_data_5, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8)
#define FT_DEFINE_SERVICEDESCREC10(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4, serv_id_5, serv_data_5, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8, serv_id_9, serv_data_9, serv_id_10, serv_data_10)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static char memory[1024 *256]
struct @1673::@1674 driver
FT_BEGIN_HEADER struct PS_DriverRec_ PS_DriverRec
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
SFNT_Interface * SFNT_Service
FT_UInt embedded_postscript
FT_Fixed underline_position
FT_Fixed underline_thickness
PS_FontExtraRec * font_extra
PS_FontInfoRec * font_info
CFF_FontRecDictRec font_dict
FT_Module_Requester get_interface
TT_Face_GetKerningFunc get_kerning
#define FT_DEFINE_SERVICE_CFFLOADREC(class_, get_standard_encoding_, load_private_dict_, fd_select_get_, blend_check_vector_, blend_build_vector_)
FT_Bool(* FT_Blend_Check_Vector_Func)(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
FT_Error(* FT_Load_Private_Dict_Func)(CFF_Font font, CFF_SubFont subfont, FT_UInt lenNDV, FT_Fixed *NDV)
FT_Byte(* FT_FD_Select_Get_Func)(CFF_FDSelect fdselect, FT_UInt glyph_index)
FT_UShort(* FT_Get_Standard_Encoding_Func)(FT_UInt charcode)
FT_Error(* FT_Blend_Build_Vector_Func)(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
FT_Error(* FT_CID_GetCIDFromGlyphIndexFunc)(FT_Face face, FT_UInt glyph_index, FT_UInt *cid)
FT_Error(* FT_CID_GetIsInternallyCIDKeyedFunc)(FT_Face face, FT_Bool *is_cid)
FT_Error(* FT_CID_GetRegistryOrderingSupplementFunc)(FT_Face face, const char **registry, const char **ordering, FT_Int *supplement)
#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, get_is_cid_, get_cid_from_glyph_index_)
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_)
FT_Error(* FT_HAdvance_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
void(* FT_Metrics_Adjust_Func)(FT_Face face)
FT_Error(* FT_VOrg_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
#define FT_SERVICE_ID_METRICS_VARIATIONS
FT_Error(* FT_LSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
FT_Error(* FT_TSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
FT_Error(* FT_RSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
FT_Error(* FT_VAdvance_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC(class_, hadvance_adjust_, lsb_adjust_, rsb_adjust_, vadvance_adjust_, tsb_adjust_, bsb_adjust_, vorg_adjust_, metrics_adjust_)
FT_Error(* FT_BSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
FT_Error(* FT_Set_Instance_Func)(FT_Face face, FT_UInt instance_index)
FT_Error(* FT_Set_MM_Blend_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
FT_Error(* FT_Get_MM_Func)(FT_Face face, FT_Multi_Master *master)
FT_Error(* FT_Set_MM_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, set_mm_blend_, get_mm_blend_, get_mm_var_, set_var_design_, get_var_design_, set_instance_, get_var_blend_, done_blend_)
FT_Error(* FT_Get_MM_Var_Func)(FT_Face face, FT_MM_Var **master)
FT_Error(* FT_Get_MM_Blend_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
#define FT_SERVICE_ID_MULTI_MASTERS
void(* FT_Done_Blend_Func)(FT_Face)
FT_Error(* FT_Get_Var_Blend_Func)(FT_Face face, FT_UInt *num_coords, FT_Fixed **coords, FT_Fixed **normalizedcoords, FT_MM_Var **mm_var)
FT_Error(* FT_Get_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
FT_Error(* FT_Set_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
const char *(* FT_PsName_GetFunc)(FT_Face face)
#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_)
#define FT_DEFINE_SERVICE_PROPERTIESREC(class_, set_property_, get_property_)
FT_Error(* FT_Properties_GetFunc)(FT_Module module, const char *property_name, void *value)
FT_Error(* FT_Properties_SetFunc)(FT_Module module, const char *property_name, const void *value, FT_Bool value_is_string)
FT_Long(* PS_GetFontValueFunc)(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, ps_get_font_extra_, has_glyph_names_, get_font_private_, get_font_value_)
FT_Error(* PS_GetFontInfoFunc)(FT_Face face, PS_FontInfoRec *afont_info)
FT_Int(* PS_HasGlyphNamesFunc)(FT_Face face)
FT_Error(* PS_GetFontExtraFunc)(FT_Face face, PS_FontExtraRec *afont_extra)
FT_Error(* PS_GetFontPrivateFunc)(FT_Face face, PS_PrivateRec *afont_private)
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_)
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
FT_UInt FT_UInt FT_Vector * kerning
FT_UInt FT_UInt right_glyph
#define TT_FACE_FLAG_VAR_HADVANCE
struct TT_FaceRec_ * TT_Face
#define TT_FACE_FLAG_VAR_VADVANCE