Now all pass with fonts too.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Nov 2014 23:53:42 +0000 (15:53 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Nov 2014 23:53:42 +0000 (15:53 -0800)
dump.c
notes

diff --git a/dump.c b/dump.c
index 310b6a15f596b70fe8395d09d05118a164825c25..ac5191975310547456e6bedc05741ca5f7dfef26 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1567,6 +1567,40 @@ dump_title(void)
     }
 }
 
+static void
+dump_fonts(void)
+{
+  int i;
+
+  printf("fonts: offset=%08x\n", pos);
+  match_byte(0);
+  for (i = 1; i <= 8; i++)
+    {
+      printf("%08x: font %d, ", pos, i);
+      match_byte_assert(i);
+      match_byte_assert(0x31);
+      printf("%s, ", get_string());
+      match_byte_assert(0);
+      match_byte_assert(0);
+      if (!match_byte(0x40) && !match_byte(0x20) && !match_byte(0x80) && !match_byte(0x10))
+        match_byte_assert(0x50);
+      if (!match_byte(0x41))
+        match_byte_assert(0x51);
+      pos += 13;
+      printf ("%s, ", get_string());
+      printf ("%s, ", get_string());
+      match_u32_assert(0);
+      match_u32_assert(0);
+      pos++;
+      get_u32();
+      get_u32();
+      get_u32();
+      get_u32();
+      putchar('\n');
+    }
+
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -1649,8 +1683,9 @@ main(int argc, char *argv[])
           pos = start;
           dump_dims ();
           dump_data ();
+          dump_title ();
           if (!strcmp(argv[1], "all"))
-            dump_title ();
+            dump_fonts();
           exit(0);
         }
       else
diff --git a/notes b/notes
index 772dbb8a6a7be4cba33703256e47886a38055b2e..3699abdbc8f7118c173abeaddabbcc6c97b57ede 100644 (file)
--- a/notes
+++ b/notes
@@ -412,6 +412,11 @@ tdump1 to tdump18:
     07 31 "SansSerif" 00 00 40 41 i0 00 i64173 i0 "#000000" "#ffffff" i0 i0 00 i8 i11 i1 i1
     08 31 "SansSerif" 00 00 40 41 i0 00 i2 i3     "#000000" "#ffffff" i0 i0 00 i8 i11 i1 i4 
 
+i1 i0 -> 01 00 00 00 00 00 00 00
+i0 00 -> 00 00 00 00 00
+i0 i0 -> 00 00 00 00 00 00 00 00
+
+
 tdump19 to tdump27:
     01 31 "SansSerif" 00 00 40 41 i1 i0 i0 00     "#000000" "#ffffff" i0 i0 00 i8 i11 i1 i8
     02 31 "SansSerif" 00 00 40 41 i0 00 i2 i1     "#000000" "#ffffff" i0 i0 00 i8 i11 i1 i1