X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fttf.h;h=104ac787a6695db06e5076156bd340986da4108c;hp=a5ca5236d90dfb169f92d17035b26b500f7efb7d;hb=b27d77f8a6343e60e2d3ae2c22a8096a6357a927;hpb=f4d875b670dfcdfd8b62c396c88098dc1ba7f8d8 diff --git a/lib/ttf.h b/lib/ttf.h index a5ca523..104ac78 100644 --- a/lib/ttf.h +++ b/lib/ttf.h @@ -54,7 +54,6 @@ typedef struct _table_os2 { S16 xAvgCharWidth; U16 usWeightClass; U16 usWidthClass; - U16 fsType; U16 ySubscriptXSize; U16 ySubscriptYSize; U16 ySubscriptXOffset; @@ -77,7 +76,6 @@ typedef struct _table_os2 { U8 panose_Midline; U8 panose_XHeight; U32 ulCharRange[4]; - U8 achVendID[4]; U16 fsSelection; U16 fsFirstCharIndex; @@ -103,9 +101,6 @@ typedef struct _table_os2 { typedef struct _table_hea { - S16 ascent; - S16 descent; - S16 lineGap; U16 advanceWidthMax; S16 minLeftSideBearing; S16 minRightSideBearing; @@ -145,6 +140,8 @@ typedef struct _table_head { } table_head_t; typedef struct _ttf { + char*name; + ttf_table_t*tables; table_head_t*head; @@ -154,6 +151,11 @@ typedef struct _ttf { U16 flags; char is_vertical; + + S16 ascent; + S16 descent; + S16 lineGap; + int num_glyphs; ttfglyph_t*glyphs; @@ -164,7 +166,11 @@ typedef struct _ttf { } ttf_t; -ttf_t*load_ttf(void*data, int length); +ttf_t*ttf_new(); +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_save(ttf_t*ttf, const char*filename); #endif