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
46#include FT_SERVICE_FONT_FORMAT_H
47#include FT_SERVICE_GLYPH_DICT_H
48#include FT_SERVICE_PROPERTIES_H
59#define FT_COMPONENT cffdriver
165 FT_Int32 load_flags )
173 return FT_THROW( Invalid_Slot_Handle );
175 FT_TRACE1((
"cff_glyph_load: glyph index %d\n", glyph_index ));
188 if ( cffsize->face != cffslot->face )
189 return FT_THROW( Invalid_Face_Handle );
226#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
230 return FT_THROW( Unimplemented_Feature );
240 for ( nn = 0; nn <
count; nn++ )
251 FT_TRACE5((
" idx %d: advance height %d font unit%s\n",
254 ah == 1 ?
"" :
"s" ));
260#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
264 return FT_THROW( Unimplemented_Feature );
271 for ( nn = 0; nn <
count; nn++ )
282 FT_TRACE5((
" idx %d: advance width %d font unit%s\n",
285 aw == 1 ?
"" :
"s" ));
296 for ( nn = 0; nn <
count; nn++ )
303 ?
slot->linearVertAdvance
304 :
slot->linearHoriAdvance;
330 if (
font->version_major == 2 )
334 FT_Service_GlyphDict service =
341 if ( service && service->get_name )
349 " cannot get glyph name from a CFF2 font\n"
351 " without the `psnames' module\n" ));
357 if ( !
font->psnames )
360 " cannot get glyph name from CFF & CEF fonts\n"
362 " without the `psnames' module\n" ));
368 sid =
font->charset.sids[glyph_index];
389 FT_Service_PsCMaps psnames;
404 FT_Service_GlyphDict service =
411 if ( service && service->name_index )
412 return service->name_index(
FT_FACE(
face ), glyph_name );
416 " cannot get glyph index from a CFF2 font\n"
418 " without the `psnames' module\n" ));
482 if (
FT_ALLOC( font_info,
sizeof ( *font_info ) ) )
527 if (
FT_ALLOC( font_extra,
sizeof ( *font_extra ) ) )
535 if ( embedded_postscript )
542 if ( ( start_fstype =
ft_strstr( embedded_postscript,
543 "/FSType" ) ) !=
NULL &&
545 sizeof (
"/FSType" ) - 1,
551 for (
s = start_fstype +
sizeof (
"/FSType" ) - 1;
555 if ( *
s >=
'0' && *
s <=
'9' )
567 else if ( *
s !=
' ' && *
s !=
'\n' && *
s !=
'\r' )
621 FT_Service_PsFontName service =
628 if ( service && service->get_ps_font_name )
629 return service->get_ps_font_name(
FT_FACE(
face ) );
664 if ( cmap->
clazz != &cff_cmap_encoding_class_rec &&
665 cmap->
clazz != &cff_cmap_unicode_class_rec )
668 FT_Service_TTCMaps service =
674 if ( service && service->get_cmap_info )
741 FT_TRACE1((
"cff_get_ros: too large supplement %d is truncated\n",
839#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
851 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
863 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
875 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
878 return mm->set_mm_weightvector(
FT_FACE(
face ),
len, weightvector );
887 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
890 return mm->get_mm_weightvector(
FT_FACE(
face ),
len, weightvector );
898 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
910 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
922 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
933 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
936 return mm->set_instance(
FT_FACE(
face ), instance_index );
941 cff_service_multi_masters,
969 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
979 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
987 cff_service_metrics_variations,
1009 cff_service_cff_load,
1031#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
1032 defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1047#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
1060#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1118#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1119#define CFF_SIZE_SELECT cff_size_select
1121#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 &cff_service_cff_load cff_get_interface(FT_Module driver, const char *module_interface)
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 & cff_service_get_cmap_info
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_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_get & cff_service_cid_info
FT_Properties_SetFunc ps_property_set
static FT_Error cff_get_glyph_name(CFF_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
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)
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 & cff_service_properties
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CFF_LOAD
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_ps_name
static FT_Error cff_get_is_cid(CFF_Face face, FT_Bool *is_cid)
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_ps_info
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 FT_SERVICE_ID_POSTSCRIPT_INFO
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
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 @1708::@1709 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)
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)
#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_, set_weightvector_, get_weightvector_, get_var_blend_, done_blend_)
FT_Error(* FT_Get_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
FT_Error(* FT_Get_MM_WeightVector_Func)(FT_Face face, FT_UInt *len, FT_Fixed *weight_vector)
FT_Error(* FT_Set_MM_WeightVector_Func)(FT_Face face, FT_UInt len, FT_Fixed *weight_vector)
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