20 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_SFNT_H
22 #include FT_INTERNAL_OBJECTS_H
31 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
35 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
39 #ifdef TT_CONFIG_OPTION_BDF
41 #include FT_SERVICE_BDF_H
48 #include FT_SERVICE_GLYPH_DICT_H
49 #include FT_SERVICE_POSTSCRIPT_NAME_H
50 #include FT_SERVICE_SFNT_H
51 #include FT_SERVICE_TT_CMAP_H
60 #define FT_COMPONENT trace_sfdriver
120 if ( !offset || !length )
121 return SFNT_Err_Invalid_Argument;
128 return SFNT_Err_Table_Missing;
146 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
184 FT_TRACE0((
"Ignore glyph names for invalid GID 0x%08x - 0x%08x\n",
187 for ( i = 0; i < max_gid; i++ )
218 sfnt_get_ps_name(
TT_Face face )
220 FT_Int n, found_win, found_apple;
252 if ( found_win != -1 )
282 for ( ; len > 0; len--, p += 2 )
284 if ( p[0] == 0 && p[1] >= 32 && p[1] < 128 )
294 if ( found_apple != -1 )
318 ((
char*)result)[
len] =
'\0';
340 #ifdef TT_CONFIG_OPTION_BDF
343 sfnt_get_charset_id(
TT_Face face,
344 const char* *acharset_encoding,
345 const char* *acharset_registry )
366 *acharset_encoding = encoding.
u.
atom;
367 *acharset_registry = registry.
u.
atom;
370 error = SFNT_Err_Invalid_Argument;
390 #if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF
398 #elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES
405 #elif defined TT_CONFIG_OPTION_BDF
426 #ifdef FT_CONFIG_OPTION_PIC
432 library = module->library;
442 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
445 tt_face_load_sfnt_header_stub(
TT_Face face,
455 return SFNT_Err_Unimplemented_Feature;
460 tt_face_load_directory_stub(
TT_Face face,
468 return SFNT_Err_Unimplemented_Feature;
473 tt_face_load_hdmx_stub(
TT_Face face,
479 return SFNT_Err_Unimplemented_Feature;
484 tt_face_free_hdmx_stub(
TT_Face face )
491 tt_face_set_sbit_strike_stub(
TT_Face face,
513 *astrike_index = 0x7FFFFFFFUL;
520 tt_face_load_sbit_stub(
TT_Face face,
532 return SFNT_Err_Unimplemented_Feature;
537 tt_face_free_sbit_stub(
TT_Face face )
545 tt_face_load_charmap_stub(
TT_Face face,
553 return SFNT_Err_Unimplemented_Feature;
558 tt_face_free_charmap_stub(
TT_Face face,
569 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
570 #define PUT_EMBEDDED_BITMAPS(a) a
572 #define PUT_EMBEDDED_BITMAPS(a) 0
574 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
575 #define PUT_PS_NAMES(a) a
577 #define PUT_PS_NAMES(a) 0
590 tt_face_load_sfnt_header_stub,
591 tt_face_load_directory_stub,
603 tt_face_load_hdmx_stub,
604 tt_face_free_hdmx_stub,
613 tt_face_set_sbit_strike_stub,
614 tt_face_load_sbit_stub,
617 tt_load_sbit_metrics,
621 tt_face_free_sbit_stub,
627 tt_face_load_charmap_stub,
628 tt_face_free_charmap_stub,
#define FT_ALLOC(ptr, size)
GLenum GLsizei GLenum GLenum const GLvoid * table
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
tt_face_load_head(TT_Face face, FT_Stream stream)
tt_face_free_ps_names(TT_Face face)
cannot open resource broken file module version is too low unimplemented feature broken offset within table missing module invalid character code cannot render this glyph format invalid composite glyph invalid pixel size invalid library handle invalid face handle invalid glyph slot handle invalid cache manager handle too many modules out of memory cannot open stream invalid stream skip invalid stream operation nested frame access raster uninitialized raster overflow too many registered caches too few arguments code overflow division by zero found debug opcode nested DEFS execution context too long too many instruction definitions horizontal header(hhea) table missing" ) FT_ERRORDEF_( Locations_Missing
#define FT_SFNT_SERVICE_BDF_GET
tt_face_load_hhea(TT_Face face, FT_Stream stream, FT_Bool vertical)
tt_face_get_kerning(TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph)
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
tt_face_get_metrics(TT_Face face, FT_Bool vertical, FT_UInt gindex, FT_Short *abearing, FT_UShort *aadvance)
tt_face_load_font_dir(TT_Face face, FT_Stream stream)
tt_face_load_pclt(TT_Face face, FT_Stream stream)
union BDF_PropertyRec_::@18 u
sfnt_init_face(FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
tt_face_set_sbit_strike(TT_Face face, FT_Size_Request req, FT_ULong *astrike_index)
tt_face_load_gasp(TT_Face face, FT_Stream stream)
#define FT_TT_SERVICE_GET_CMAP_INFO_GET
tt_face_free_name(TT_Face face)
EGLImageKHR EGLint * name
tt_get_cmap_info(FT_CharMap charmap, TT_CMapInfo *cmap_info)
#define FT_SERVICE_ID_BDF
tt_face_load_sbit_image(TT_Face face, FT_ULong strike_index, FT_UInt glyph_index, FT_UInt load_flags, FT_Stream stream, FT_Bitmap *map, TT_SBit_MetricsRec *metrics)
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
tt_face_get_ps_name(TT_Face face, FT_UInt idx, FT_String **PSname)
tt_face_load_any(TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
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)
void *(* FT_SFNT_TableGetFunc)(FT_Face face, FT_Sfnt_Tag tag)
FT_Error(* FT_SFNT_TableLoadFunc)(FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
#define FT_SFNT_SERVICE_PS_NAME_GET
enum FT_Sfnt_Tag_ FT_Sfnt_Tag
tt_face_load_cmap(TT_Face face, FT_Stream stream)
EGLContext EGLenum EGLClientBuffer buffer
FT_Error(* FT_SFNT_TableInfoFunc)(FT_Face face, FT_UInt idx, FT_ULong *tag, FT_ULong *offset, FT_ULong *length)
tt_face_load_maxp(TT_Face face, FT_Stream stream)
TT_CMap_Info_GetFunc tt_get_cmap_info FT_DEFINE_SERVICEDESCREC3(sfnt_services, FT_SERVICE_ID_SFNT_TABLE,&FT_SFNT_SERVICE_SFNT_TABLE_GET, FT_SERVICE_ID_POSTSCRIPT_FONT_NAME,&FT_SFNT_SERVICE_PS_NAME_GET, FT_SERVICE_ID_TT_CMAP,&FT_TT_SERVICE_GET_CMAP_INFO_GET) sfnt_get_interface(FT_Module module
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
#define FT_DEFINE_SERVICEDESCREC4(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)
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
#define FT_SFNT_SERVICE_GLYPH_DICT_GET
TT_MaxProfile max_profile
#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_,interface_, init_, done_, get_interface_)
sfnt_load_face(FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
#define FT_TRACE0(varformat)
void(* FT_Module_Destructor)(FT_Module module)
FT_DEFINE_SERVICE_SFNT_TABLEREC(sfnt_service_sfnt_table,(FT_SFNT_TableLoadFunc) tt_face_load_any,(FT_SFNT_TableGetFunc) get_sfnt_table,(FT_SFNT_TableInfoFunc) sfnt_table_info) static const char *sfnt_get_ps_name(TT_Face face)
FT_Pointer FT_Module_Interface
FT_Error(* FT_BDF_GetPropertyFunc)(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
#define FT_SFNT_SERVICE_SFNT_TABLE_GET
#define FT_DEFINE_SERVICE_BDFRec(class_,get_charset_id_,get_property_)
const char * postscript_name
#define FT_CALLBACK_DEF(x)
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
FT_BEGIN_HEADER tt_face_load_eblc(TT_Face face, FT_Stream stream)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_SERVICE_ID_SFNT_TABLE
TT_NameTableRec name_table
#define FT_STREAM_SEEK(position)
FT_Size_Request_Type type
FT_Error(* FT_Module_Constructor)(FT_Module module)
tt_face_load_kern(TT_Face face, FT_Stream stream)
#define PUT_EMBEDDED_BITMAPS(a)
GLenum GLenum GLenum input
sfnt_done_face(TT_Face face)
static FT_Error sfnt_table_info(TT_Face face, FT_UInt idx, FT_ULong *tag, FT_ULong *offset, FT_ULong *length)
tt_face_load_os2(TT_Face face, FT_Stream stream)
tt_face_load_hmtx(TT_Face face, FT_Stream stream, FT_Bool vertical)
GLdouble GLdouble GLdouble r
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
#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_)
tt_face_free_eblc(TT_Face face)
#define FT_FRAME_ENTER(size)
const char *(* FT_PsName_GetFunc)(FT_Face face)
tt_face_load_name(TT_Face face, FT_Stream stream)
#define FT_STRCPYN(dst, src, size)
#define FT_SFNT_SERVICES_GET
#define FT_DEFINE_SFNT_INTERFACE(class_,goto_table_, init_face_, load_face_, done_face_, get_interface_,load_any_, load_sfnt_header_, load_directory_, load_head_,load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_,load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_,load_kern_, load_gasp_, load_pclt_, load_bhed_,set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_,load_sbit_metrics_, load_sbit_image_, free_sbits_stub_,get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_,get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_,set_sbit_strike_, load_strike_metrics_, get_metrics_)
tt_face_load_post(TT_Face face, FT_Stream stream)
#define FT_STREAM_READ(buffer, count)
#define FT_DEFINE_SERVICEDESCREC5(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)
static void * get_sfnt_table(TT_Face face, FT_Sfnt_Tag tag)
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
FT_Error(* FT_BDF_GetCharsetIdFunc)(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
tt_face_goto_table(TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong *length)
tt_face_find_bdf_prop(TT_Face face, const char *property_name, BDF_PropertyRec *aprop)
tt_face_load_strike_metrics(TT_Face face, FT_ULong strike_index, FT_Size_Metrics *metrics)
#define FT_SFNT_INTERFACE_GET