20 #include FT_FREETYPE_H 21 #include FT_INTERNAL_DEBUG_H 22 #include FT_INTERNAL_STREAM_H 23 #include FT_INTERNAL_SFNT_H 24 #include FT_SERVICE_CID_H 25 #include FT_SERVICE_POSTSCRIPT_INFO_H 26 #include FT_SERVICE_POSTSCRIPT_NAME_H 27 #include FT_SERVICE_TT_CMAP_H 38 #include FT_SERVICE_XFREE86_NAME_H 39 #include FT_SERVICE_GLYPH_DICT_H 40 #include FT_SERVICE_PROPERTIES_H 50 #define FT_COMPONENT trace_cffdriver 67 #define PAIR_TAG( left, right ) ( ( (FT_ULong)left << 16 ) | \ 117 kerning->x = sfnt->
get_kerning( face, left_glyph, right_glyph );
164 return FT_THROW( Invalid_Slot_Handle );
177 if ( cffsize->face != cffslot->face )
178 return FT_THROW( Invalid_Face_Handle );
205 for ( nn = 0; nn <
count; nn++ )
240 " cannot get glyph name from CFF & CEF fonts\n" 242 " without the `PSNames' module\n" ));
269 FT_Service_PsCMaps psnames;
284 sid = charset->
sids[
i];
289 name = (
FT_String *)psnames->adobe_std_strings( sid );
303 cff_service_glyph_dict,
315 cff_ps_has_glyph_names(
FT_Face face )
322 cff_ps_get_font_info(
CFF_Face face,
336 if (
FT_ALLOC( font_info,
sizeof ( *font_info ) ) )
424 FT_Service_TTCMaps service =
429 if ( service && service->get_cmap_info )
430 error = service->get_cmap_info( charmap, cmap_info );
438 cff_service_get_cmap_info,
464 error =
FT_THROW( Invalid_Argument );
493 FT_TRACE1((
"cff_get_ros: too large supplement %d is truncated\n",
528 cff_get_cid_from_glyph_index(
CFF_Face face,
546 error =
FT_THROW( Invalid_Argument );
552 error =
FT_THROW( Invalid_Argument );
568 cff_service_cid_info,
593 driver->hinting_engine = *hinting_engine;
597 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
602 driver->no_stem_darkening = *no_stem_darkening;
607 FT_TRACE0((
"cff_property_set: missing property `%s'\n",
609 return FT_THROW( Missing_Property );
615 const char* property_name,
621 FT_UInt hinting_engine = driver->hinting_engine;
622 FT_Bool no_stem_darkening = driver->no_stem_darkening;
625 if ( !
ft_strcmp( property_name,
"hinting-engine" ) )
630 *val = hinting_engine;
634 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
639 *val = no_stem_darkening;
644 FT_TRACE0((
"cff_property_get: missing property `%s'\n",
646 return FT_THROW( Missing_Property );
651 cff_service_properties,
668 #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES 702 #ifdef FT_CONFIG_OPTION_PIC 705 library = driver->library;
711 if ( result != NULL )
715 #ifndef FT_CONFIG_OPTION_PIC 718 library = driver->library;
732 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 733 #define CFF_SIZE_SELECT cff_size_select 735 #define CFF_SIZE_SELECT 0 768 ft_stub_set_char_sizes,
769 ft_stub_set_pixel_sizes,
#define FT_ALLOC(ptr, size)
FT_DEFINE_SERVICE_PROPERTIESREC(cff_service_properties,(FT_Properties_SetFunc) cff_property_set,(FT_Properties_GetFunc) cff_property_get) FT_DEFINE_SERVICEDESCREC7(cff_services
cff_face_init(FT_Stream stream, FT_Face cffface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
#define FT_LOAD_VERTICAL_LAYOUT
SFNT_Interface * SFNT_Service
#define CFF_CMAP_UNICODE_CLASS_REC_GET
FT_Error(* FT_CID_GetIsInternallyCIDKeyedFunc)(FT_Face face, FT_Bool *is_cid)
FT_SERVICE_ID_POSTSCRIPT_INFO
& CFF_SERVICE_PS_NAME_GET
FT_Fixed underline_position
cff_size_init(FT_Size cffsize)
#define FT_LOAD_NO_HINTING
return FT_THROW(Missing_Property)
cff_index_get_string(CFF_Font font, FT_UInt element)
PS_FontInfoRec * font_info
struct CFF_FontRec_ * CFF_Font
FT_Fixed linearHoriAdvance
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
#define FT_MODULE_DRIVER_SCALABLE
FT_Fixed underline_thickness
cff_get_advances(FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
#define FT_LOAD_ADVANCE_ONLY
return cff_index_get_sid_string(cff, sid)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
FT_Service_PsCMaps psnames
FT_DEFINE_SERVICE_PSINFOREC(cff_service_ps_info,(PS_GetFontInfoFunc) cff_ps_get_font_info,(PS_GetFontExtraFunc) NULL,(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_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)
& CFF_SERVICE_GET_CMAP_INFO_GET
#define FT_TRACE1(varformat)
GLenum GLuint GLint GLenum face
#define FT_ERROR(varformat)
cff_driver_done(FT_Module module)
struct CFF_GlyphSlotRec_ * CFF_GlyphSlot
#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_, old_set_char_sizes_, old_set_pixel_sizes_, load_glyph_, get_kerning_, attach_file_, get_advances_, request_size_, select_size_)
CFF_FontRecDictRec font_dict
#define FT_MODULE_DRIVER_HAS_HINTER
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) static FT_Error cff_property_set(FT_Module module
ft_module_get_service(FT_Module module, const char *service_id)
cff_driver_init(FT_Module module)
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
struct TT_FaceRec_ * TT_Face
FT_Long(* PS_GetFontValueFunc)(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
cff_glyph_load(FT_GlyphSlot cffslot, FT_Size cffsize, FT_UInt glyph_index, FT_Int32 load_flags)
FT_Error(* FT_CID_GetRegistryOrderingSupplementFunc)(FT_Face face, const char **registry, const char **ordering, FT_Int *supplement)
TT_Face_GetKerningFunc get_kerning
& CFF_SERVICE_GLYPH_DICT_GET
#define FT_DEFINE_SERVICEDESCREC6(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)
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
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
FT_Pointer FT_Module_Interface
& CFF_SERVICE_CID_INFO_GET
cff_slot_init(FT_GlyphSlot slot)
#define FT_CALLBACK_DEF(x)
#define FT_MODULE_FONT_DRIVER
cff_slot_load(CFF_GlyphSlot glyph, CFF_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
struct CFF_SizeRec_ * CFF_Size
GLsizei const GLfloat * value
cff_get_kerning(FT_Face ttface, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
FT_Error(* PS_GetFontExtraFunc)(FT_Face face, PS_FontExtraRec *afont_extra)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
&CFF_SERVICE_PROPERTIES_GET cff_get_interface(FT_Module driver, const char *module_interface)
GLuint const GLchar * name
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
const char *(* FT_PsName_GetFunc)(FT_Face face)
#define CFF_CMAP_ENCODING_CLASS_REC_GET
FT_Error(* FT_Properties_SetFunc)(FT_Module module, const char *property_name, const void *value)
typedefFT_BEGIN_HEADER struct CFF_DriverRec_ * CFF_Driver
cff_slot_done(FT_GlyphSlot slot)
& CFF_SERVICE_PS_INFO_GET
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
FT_Fixed linearVertAdvance
FT_Get_Module(FT_Library library, const char *module_name)
cff_size_done(FT_Size cffsize)
GLuint GLuint GLsizei count
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
#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)
cff_size_request(FT_Size size, FT_Size_Request req)
FT_Error(* FT_Properties_GetFunc)(FT_Module module, const char *property_name, void *value)
const char * property_name
FT_Int(* PS_HasGlyphNamesFunc)(FT_Face face)
#define CFF_SERVICE_PROPERTIES_GET
FT_Error(* PS_GetFontPrivateFunc)(FT_Face face, PS_PrivateRec *afont_private)
FT_TRACE0(("cff_property_set: missing property `%s'\, property_name))
#define FT_STRCPYN(dst, src, size)
if(cmap->clazz !=&CFF_CMAP_ENCODING_CLASS_REC_GET &&cmap->clazz !=&CFF_CMAP_UNICODE_CLASS_REC_GET)
#define FT_FACE_LIBRARY(x)
cff_face_done(FT_Face cffface)
const char const char FT_Int * supplement
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
FT_Module_Requester get_interface
#define FT_FACE_FLAG_GLYPH_NAMES
FT_Error(* PS_GetFontInfoFunc)(FT_Face face, PS_FontInfoRec *afont_info)
FT_Error(* FT_CID_GetCIDFromGlyphIndexFunc)(FT_Face face, FT_UInt glyph_index, FT_UInt *cid)
const char const char ** ordering