X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fttf.h;h=9a76949d13cc350cc27584564be94d0e8e7a0e47;hp=73bd35cf06322915809594504d16dd0c3075bd90;hb=27a1543b139be30ef7e9d2ba21cb067f8ae685c0;hpb=4c389168a91bf083e434885fbfd8f51c6dab56fc diff --git a/lib/ttf.h b/lib/ttf.h index 73bd35c..9a76949 100644 --- a/lib/ttf.h +++ b/lib/ttf.h @@ -139,13 +139,49 @@ typedef struct _table_head { S16 dir_hint; } table_head_t; +typedef struct _table_post { + U16 italic_angle; + U16 underline_position; + U16 underline_thickness; +} table_post_t; + +typedef struct _table_cvt { + S16*values; + int num; +} table_cvt_t; + +typedef struct _table_gasp { + int num; + struct { + U16 size; + U16 behaviour; + } *records; +} table_gasp_t; + +typedef struct _table_code { + U8*code; + int size; +} table_code_t; + typedef struct _ttf { + char*family_name; /* nameId 1 */ + char*subfamily_name; /* nameId 2 */ + char*font_uid; /* nameId 3 */ + char*full_name; /* nameId 4 */ + char*version_string; /* nameId 5 */ + char*postscript_name; /* nameId 6 */ + ttf_table_t*tables; table_head_t*head; table_maxp_t*maxp; table_os2_t*os2; table_hea_t*hea; + table_post_t*post; + table_cvt_t*cvt; + table_gasp_t*gasp; + table_code_t*prep; + table_code_t*fpgm; U16 flags; char is_vertical; @@ -165,10 +201,13 @@ typedef struct _ttf { ttf_t*ttf_new(); +void ttf_reduce(ttf_t*ttf); ttf_t*ttf_load(void*data, int length); ttf_table_t*ttf_addtable(ttf_t*ttf, U32 tag); void ttf_create_truetype_tables(ttf_t*ttf); void ttf_dump(ttf_t*ttf); +void ttf_destroy(ttf_t*ttf); void ttf_save(ttf_t*ttf, const char*filename); +void ttf_save_eot(ttf_t*ttf, const char*filename); #endif