chiark / gitweb /
Minor silliness: a few obvious extra glyphs and a whole set of small
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 30 Sep 2009 23:49:39 +0000 (00:49 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 30 Sep 2009 23:49:39 +0000 (00:49 +0100)
caps, because they turned out far better that they had any right to.

ttxt.c

diff --git a/ttxt.c b/ttxt.c
index aaab28b2f7a81071b4bc31dcbe9fc51919feb1a2..c8f89c1e9f08037ae168f42fd90948cfb395f1d3 100644 (file)
--- a/ttxt.c
+++ b/ttxt.c
@@ -22,7 +22,7 @@ void dochar(char data[YSIZE]);
 
 struct glyph {
        char data[YSIZE];
-       unsigned unicode;
+       int unicode;
        char const *name;
 } glyphs[] = {
  /* Standard character set -- glyphs from BBC Micro User Guide */
@@ -134,6 +134,39 @@ struct glyph {
  {{004,012,021,000,000,000,000,000,000,000}, 0x005e, "asciicircum" },
  {{000,000,000,000,000,000,000,037,000,000}, 0x005f, "underscore" },
  {{010,004,002,000,000,000,000,000,000,000}, 0x0060, "grave" },
+
+ /* Obvious derivatives of above glyphs */
+ {{002,004,010,000,000,000,000,000,000,000}, 0x00b4, "acute" },
+ {{000,004,004,025,016,004,000,000,000,000}, 0x2193, "arrowdown" },
+ {{000,021,012,004,012,021,000,000,000,000}, 0x00d7, "multiply" },
+
+ /* This is getting silly. */
+ {{000,000,004,012,021,037,021,000,000,000}, -1, "a.sc" },
+ {{000,000,036,021,036,021,036,000,000,000}, -1, "b.sc" },
+ {{000,000,016,021,020,021,016,000,000,000}, -1, "c.sc" },
+ {{000,000,036,021,021,021,036,000,000,000}, -1, "d.sc" },
+ {{000,000,037,020,036,020,037,000,000,000}, -1, "e.sc" },
+ {{000,000,037,020,036,020,020,000,000,000}, -1, "f.sc" },
+ {{000,000,016,020,023,021,016,000,000,000}, -1, "g.sc" },
+ {{000,000,021,021,037,021,021,000,000,000}, -1, "h.sc" },
+ {{000,000,016,004,004,004,016,000,000,000}, -1, "i.sc" },
+ {{000,000,001,001,001,021,016,000,000,000}, -1, "j.sc" },
+ {{000,000,021,022,034,022,021,000,000,000}, -1, "k.sc" },
+ {{000,000,020,020,020,020,037,000,000,000}, -1, "l.sc" },
+ {{000,000,021,033,025,021,021,000,000,000}, -1, "m.sc" },
+ {{000,000,021,031,025,023,021,000,000,000}, -1, "n.sc" },
+ {{000,000,016,021,021,021,016,000,000,000}, -1, "o.sc" },
+ {{000,000,036,021,036,020,020,000,000,000}, -1, "p.sc" },
+ {{000,000,016,021,025,022,015,000,000,000}, -1, "q.sc" },
+ {{000,000,036,021,036,022,021,000,000,000}, -1, "r.sc" },
+ {{000,000,017,020,016,001,036,000,000,000}, -1, "s.sc" },
+ {{000,000,037,004,004,004,004,000,000,000}, -1, "t.sc" },
+ {{000,000,021,021,021,021,016,000,000,000}, -1, "u.sc" },
+ {{000,000,021,021,012,012,004,000,000,000}, -1, "v.sc" },
+ {{000,000,021,021,025,025,012,000,000,000}, -1, "w.sc" },
+ {{000,000,021,012,004,012,021,000,000,000}, -1, "x.sc" },
+ {{000,000,021,012,004,004,004,000,000,000}, -1, "y.sc" },
+ {{000,000,037,002,004,010,037,000,000,000}, -1, "z.sc" },
 };
 
 int
@@ -156,16 +189,16 @@ main(int argc, char **argv)
        printf("LayerCount: 2\n");
        printf("Layer: 0 0 \"Back\" 1\n");
        printf("Layer: 1 0 \"Fore\" 0\n");
-       printf("Encoding: UnicodeBmp\n");
+/*     printf("Encoding: UnicodeBmp\n"); */
        printf("NameList: Adobe Glyph List\n");
        printf("DisplaySize: -24\n");
        printf("AntiAlias: 1\n");
        printf("FitToEm: 1\n");
-       printf("BeginChars: 65537 %d\n", nglyphs);
+       printf("BeginChars: %d %d\n", nglyphs+32, nglyphs);
        for (i = 0; i < nglyphs; i++) {
                printf("StartChar: %s\n", glyphs[i].name);
                printf("Encoding: %d %d %d\n",
-                   glyphs[i].unicode, glyphs[i].unicode, i);
+                   i+32, glyphs[i].unicode, i);
                printf("Width: 600\n");
                printf("Flags:\n");
                printf("LayerCount: 2\n");