small bug in ttf reading
authorMatthias Kramm <kramm@quiss.org>
Tue, 11 May 2010 22:46:15 +0000 (15:46 -0700)
committerMatthias Kramm <kramm@quiss.org>
Tue, 11 May 2010 22:46:15 +0000 (15:46 -0700)
lib/ttf.c
lib/ttf.h

index 601aa74..c1fd06d 100644 (file)
--- 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)
 {
index e5462e9..0d1ff50 100644 (file)
--- 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;