From fc8854e5ed42dbcef96d25eb851b9873707a15ff Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 11 May 2010 15:46:15 -0700 Subject: [PATCH] small bug in ttf reading --- lib/ttf.c | 14 +++++++------- lib/ttf.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ttf.c b/lib/ttf.c index 601aa74..c1fd06d 100644 --- a/lib/ttf.c +++ b/lib/ttf.c @@ -1638,15 +1638,15 @@ static table_post_t*post_new(ttf_t*ttf) void post_parse(memreader_t*r, ttf_t*ttf) { table_post_t*post = ttf->post = rfx_calloc(sizeof(table_post_t)); - U16 format = readU16(r); - post->italic_angle = readU16(r); + U32 format = readU32(r); + post->italic_angle = readU32(r); post->underline_position = readU16(r); post->underline_thickness = readU16(r); - U16 is_monospaced = readU16(r); - readU16(r); // min mem 42 - readU16(r); - readU16(r); // min mem 1 - readU16(r); + U16 is_monospaced = readU32(r); + readU32(r); // min mem 42 + readU32(r); + readU32(r); // min mem 1 + readU32(r); } void post_write(ttf_t*ttf, ttf_table_t*table) { diff --git a/lib/ttf.h b/lib/ttf.h index e5462e9..0d1ff50 100644 --- a/lib/ttf.h +++ b/lib/ttf.h @@ -140,7 +140,7 @@ typedef struct _table_head { } table_head_t; typedef struct _table_post { - U16 italic_angle; + U32 italic_angle; U16 underline_position; U16 underline_thickness; } table_post_t; -- 1.7.10.4