From: Ben Harris Date: Wed, 30 Sep 2009 20:02:28 +0000 (+0100) Subject: Tidy glyph list a little, sort it more authentically, and so on. X-Git-Tag: bedstead-000.900~47 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=b5faa814ae14568d8f0b4022a75c2eed1b54c114;p=bedstead.git Tidy glyph list a little, sort it more authentically, and so on. --- diff --git a/ttxt.c b/ttxt.c index d7a0c2d..aaab28b 100644 --- a/ttxt.c +++ b/ttxt.c @@ -25,10 +25,11 @@ struct glyph { unsigned unicode; char const *name; } glyphs[] = { + /* Standard character set -- glyphs from BBC Micro User Guide */ {{000,000,000,000,000,000,000,000,000,000}, 0x0020, "space" }, {{004,004,004,004,004,000,004,000,000,000}, 0x0021, "exclam" }, {{012,012,012,000,000,000,000,000,000,000}, 0x0022, "quotedbl" }, - {{012,012,037,012,037,012,012,000,000,000}, 0x0023, "numbersign" }, + {{006,011,010,010,034,010,010,037,000,000}, 0x00a3, "sterling" }, {{016,025,024,016,005,025,016,000,000,000}, 0x0024, "dollar" }, {{030,031,002,004,010,023,003,000,000,000}, 0x0025, "percent" }, {{010,024,024,010,025,022,015,000,000,000}, 0x0026, "ampersand" }, @@ -77,24 +78,24 @@ struct glyph { {{016,021,021,021,025,022,015,000,000,000}, 0x0051, "Q" }, {{036,021,021,036,024,022,021,000,000,000}, 0x0052, "R" }, {{016,021,020,016,001,021,016,000,000,000}, 0x0053, "S" }, - {{037,004,004,004,004,004,004,000,000,000}, 0x0054, "T" }, /* T */ + {{037,004,004,004,004,004,004,000,000,000}, 0x0054, "T" }, {{021,021,021,021,021,021,016,000,000,000}, 0x0055, "U" }, {{021,021,021,012,012,004,004,000,000,000}, 0x0056, "V" }, {{021,021,021,025,025,025,012,000,000,000}, 0x0057, "W" }, {{021,021,012,004,012,021,021,000,000,000}, 0x0058, "X" }, {{021,021,012,004,004,004,004,000,000,000}, 0x0059, "Y" }, - {{037,001,002,004,010,020,037,000,000,000}, 0x005a, "Z" }, /* Z */ - {{016,010,010,010,010,010,016,000,000,000}, 0x005b, "bracketleft" }, - {{000,020,010,004,002,001,000,000,000,000}, 0x005c, "backslash" }, - {{016,002,002,002,002,002,016,000,000,000}, 0x005d, "bracketright" }, - {{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, "asciigrave" }, + {{037,001,002,004,010,020,037,000,000,000}, 0x005a, "Z" }, + {{000,004,010,037,010,004,000,000,000,000}, 0x2190, "arrowleft" }, + {{020,020,020,020,026,001,002,004,007,000}, 0x00bd, "onehalf" }, + {{000,004,002,037,002,004,000,000,000,000}, 0x2192, "arrowright" }, + {{000,004,016,025,004,004,000,000,000,000}, 0x2191, "arrowup" }, + {{000,000,000,037,000,000,000,000,000,000}, 0x2013, "endash" }, + {{012,012,037,012,037,012,012,000,000,000}, 0x0023, "numbersign" }, {{000,000,016,001,017,021,017,000,000,000}, 0x0061, "a" }, {{020,020,036,021,021,021,036,000,000,000}, 0x0062, "b" }, {{000,000,017,020,020,020,017,000,000,000}, 0x0063, "c" }, {{001,001,017,021,021,021,017,000,000,000}, 0x0064, "d" }, - {{000,000,016,021,037,020,016,000,000,000}, 0x0065, "e" }, /* e */ + {{000,000,016,021,037,020,016,000,000,000}, 0x0065, "e" }, {{002,004,004,016,004,004,004,000,000,000}, 0x0066, "f" }, {{000,000,017,021,021,021,017,001,016,000}, 0x0067, "g" }, {{020,020,036,021,021,021,021,000,000,000}, 0x0068, "h" }, @@ -116,27 +117,29 @@ struct glyph { {{000,000,021,012,004,012,021,000,000,000}, 0x0078, "x" }, {{000,000,021,021,021,021,017,001,016,000}, 0x0079, "y" }, {{000,000,037,002,004,010,037,000,000,000}, 0x007a, "z" }, + {{010,010,010,010,011,003,005,007,001,000}, 0x00bc, "onequarter" }, + {{012,012,012,012,012,012,012,000,000,000}, 0x2016, "dblverticalbar" }, + {{030,004,030,004,031,003,005,007,001,000}, 0x00be, "threequarters" }, + {{000,004,000,037,000,004,000,000,000,000}, 0x00f7, "divide" }, + {{037,037,037,037,037,037,037,000,000,000}, 0x2588, "block" }, + + /* Additional glyphs by bjh21 to give us ASCII at least. */ {{003,004,004,030,004,004,003,000,000,000}, 0x007b, "braceleft" }, {{004,004,004,004,004,004,004,000,000,000}, 0x007c, "bar" }, {{030,004,004,003,004,004,030,000,000,000}, 0x007d, "braceright" }, {{010,025,002,000,000,000,000,000,000,000}, 0x007e, "asciitilde" }, - {{037,037,037,037,037,037,037,000,000,000}, 0x2588, "block" }, - {{000,004,010,037,010,004,000,000,000,000}, 0x2190, "arrowleft" }, - {{020,020,020,020,026,001,002,004,007,000}, 0x00bd, "onehalf" }, - {{000,004,002,037,002,004,000,000,000,000}, 0x2192, "arrowright" }, - {{000,004,016,025,004,004,000,000,000,000}, 0x2191, "arrowup" }, - {{000,000,000,037,000,000,000,000,000,000}, 0x2013, "endash" }, - {{006,011,010,010,034,010,010,037,000,000}, 0x00a3, "sterling" }, - {{010,010,010,010,011,003,005,007,001,000}, 0x00bc, "onequarter" }, - {{012,012,012,012,012,012,012,000,000,000}, 0x0000, "doublebar" }, /*XXX*/ - {{030,004,030,004,031,003,005,007,001,000}, 0x00be, "threequarters" }, - {{000,004,000,037,000,004,000,000,000,000}, 0x00f7, "divide" }, + {{016,010,010,010,010,010,016,000,000,000}, 0x005b, "bracketleft" }, + {{000,020,010,004,002,001,000,000,000,000}, 0x005c, "backslash" }, + {{016,002,002,002,002,002,016,000,000,000}, 0x005d, "bracketright" }, + {{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" }, }; int main(int argc, char **argv) { - int i; + int i, nglyphs = sizeof(glyphs) / sizeof(glyphs[0]); printf("SplineFontDB: 3.0\n"); printf("FontName: TTXT\n"); @@ -158,8 +161,8 @@ main(int argc, char **argv) printf("DisplaySize: -24\n"); printf("AntiAlias: 1\n"); printf("FitToEm: 1\n"); - printf("BeginChars: 65537 105\n"); - for (i = 0; i < 105; i++) { + printf("BeginChars: 65537 %d\n", 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);