From: Ben Harris Date: Mon, 23 Sep 2024 13:17:21 +0000 (+0100) Subject: Slight mosaic graphics rationalisation X-Git-Tag: bedstead-002.007~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=8c0b64ea5864fde0a6d8696266b0e6f07402b271;p=bedstead.git Slight mosaic graphics rationalisation All the *.sep6 glyphs are now aliases for their proper Unicode 16 names. And the 6-cell mosaic graphics are now in the section for glyphs from real character generators, because that's what they are. --- diff --git a/bedstead.c b/bedstead.c index 113de92..dd2f213 100644 --- a/bedstead.c +++ b/bedstead.c @@ -479,6 +479,39 @@ static struct glyph { {{000,000,025,025,025,025,037,001,000}, U(0449) }, /* shcha */ {{000,000,021,021,021,017,001,000,000}, U(0447) }, /* che */ + /* Mosaic graphics common to all versions */ +#define M(x, u) { {x}, U(u), MOS6 } + /* space */ M(0x01, 1FB00), M(0x02, 1FB01), M(0x03, 1FB02), + M(0x04, 1FB03), M(0x05, 1FB04), M(0x06, 1FB05), M(0x07, 1FB06), + M(0x08, 1FB07), M(0x09, 1FB08), M(0x0a, 1FB09), M(0x0b, 1FB0A), + M(0x0c, 1FB0B), M(0x0d, 1FB0C), M(0x0e, 1FB0D), M(0x0f, 1FB0E), + M(0x10, 1FB0F), M(0x11, 1FB10), M(0x12, 1FB11), M(0x13, 1FB12), + M(0x14, 1FB13), /* lfblock */ M(0x16, 1FB14), M(0x17, 1FB15), + M(0x18, 1FB16), M(0x19, 1FB17), M(0x1a, 1FB18), M(0x1b, 1FB19), + M(0x1c, 1FB1A), M(0x1d, 1FB1B), M(0x1e, 1FB1C), M(0x1f, 1FB1D), + M(0x20, 1FB1E), M(0x21, 1FB1F), M(0x22, 1FB20), M(0x23, 1FB21), + M(0x24, 1FB22), M(0x25, 1FB23), M(0x26, 1FB24), M(0x27, 1FB25), + M(0x28, 1FB26), M(0x29, 1FB27), /* rtblock */ M(0x2b, 1FB28), + M(0x2c, 1FB29), M(0x2d, 1FB2A), M(0x2e, 1FB2B), M(0x2f, 1FB2C), + M(0x30, 1FB2D), M(0x31, 1FB2E), M(0x32, 1FB2F), M(0x33, 1FB30), + M(0x34, 1FB31), M(0x35, 1FB32), M(0x36, 1FB33), M(0x37, 1FB34), + M(0x38, 1FB35), M(0x39, 1FB36), M(0x3a, 1FB37), M(0x3b, 1FB38), + M(0x3c, 1FB39), M(0x3d, 1FB3A), M(0x3e, 1FB3B), /* block */ +#undef M + {{0x15}, 0x258c, "lfblock", MOS6 }, + {{0x2a}, 0x2590, "rtblock", MOS6 }, + {{0x3f}, 0x2588, "block", MOS6 }, +#define M(u) { {0x ## u - 0x50}, U(1CE ## u), SEP6 } + /* */ M(51), M(52), M(53), M(54), M(55), M(56), M(57), + M(58), M(59), M(5A), M(5B), M(5C), M(5D), M(5E), M(5F), + M(60), M(61), M(62), M(63), M(64), M(65), M(66), M(67), + M(68), M(69), M(6A), M(6B), M(6C), M(6D), M(6E), M(6F), + M(70), M(71), M(72), M(73), M(74), M(75), M(76), M(77), + M(78), M(79), M(7A), M(7B), M(7C), M(7D), M(7E), M(7F), + M(80), M(81), M(82), M(83), M(84), M(85), M(86), M(87), + M(88), M(89), M(8A), M(8B), M(8C), M(8D), M(8E), M(8F), +#undef M + /* * The other batch of glyphs were specially designed for this font. * These are kept sorted by Unicode code point. @@ -1983,12 +2016,9 @@ static struct glyph { /* Block elements */ {{0x03}, 0x2580, "upblock", MOS4 }, {{0x03}, -1, "upblock.sep4", SEP4 }, {{0x0c}, 0x2584, "dnblock", MOS4 }, {{0x0c}, -1, "dnblock.sep4", SEP4 }, - {{0x0f}, 0x2588, "block", MOS4 }, {{0x0f}, -1, "block.sep4", SEP4 }, - {{0x3f}, -1, "block.sep6", SEP6 }, - {{0x05}, 0x258c, "lfblock", MOS4 }, {{0x05}, -1, "lfblock.sep4", SEP4 }, - {{0x15}, -1, "lfblock.sep6", SEP6 }, - {{0x0a}, 0x2590, "rtblock", MOS4 }, {{0x0a}, -1, "rtblock.sep4", SEP4 }, - {{0x2a}, -1, "rtblock.sep6", SEP6 }, + {{0x0f}, -1, "block.sep4", SEP4 }, + {{0x05}, -1, "lfblock.sep4", SEP4 }, + {{0x0a}, -1, "rtblock.sep4", SEP4 }, {{025,000,012,000,025,000,012,000,025}, 0x2591, "ltshade" }, {{022,011,004,022,011,004,022,011,004}, 0x2592, "shade" }, {{025,037,012,037,025,037,012,037,025}, 0x2593, "dkshade" }, @@ -2412,18 +2442,6 @@ static struct glyph { {{000,000,027,030,020,020,020,000,000}, U(1047E) }, /* ian */ {{000,000,020,020,022,025,015,000,000}, U(1047F) }, /* yew */ - /* Symbols for legacy computing supplement */ -#define M(u) { {0x ## u - 0x50}, U(1CE ## u), SEP6 } - /* */ M(51), M(52), M(53), M(54), M(55), M(56), M(57), /* separated mosaic */ - M(58), M(59), M(5A), M(5B), M(5C), M(5D), M(5E), M(5F), /* graphics */ - M(60), M(61), M(62), M(63), M(64), M(65), M(66), M(67), - M(68), M(69), M(6A), M(6B), M(6C), M(6D), M(6E), M(6F), - M(70), M(71), M(72), M(73), M(74), M(75), M(76), M(77), - M(78), M(79), M(7A), M(7B), M(7C), M(7D), M(7E), M(7F), - M(80), M(81), M(82), M(83), M(84), M(85), M(86), M(87), - M(88), M(89), M(8A), M(8B), M(8C), M(8D), M(8E), M(8F), -#undef M - /* Musical symbols */ {{004,004,004,004,004,004,004,004,004}, U(1D100) }, /* bar line */ {{012,012,012,012,012,012,012,012,012}, U(1D101) }, /* double bar line */ @@ -2505,24 +2523,6 @@ static struct glyph { {{000,007,017,027,037,011,000,000,000}, U(1F69A) }, /* deliverytruck */ /* Symbols for legacy computing */ -#define M(x, u) { {x}, U(u), MOS6 }, { {x}, -1, "u" #u ".sep6", SEP6 } - /* space */ M(0x01, 1FB00), M(0x02, 1FB01), M(0x03, 1FB02), - M(0x04, 1FB03), M(0x05, 1FB04), M(0x06, 1FB05), M(0x07, 1FB06), - M(0x08, 1FB07), M(0x09, 1FB08), M(0x0a, 1FB09), M(0x0b, 1FB0A), - M(0x0c, 1FB0B), M(0x0d, 1FB0C), M(0x0e, 1FB0D), M(0x0f, 1FB0E), - M(0x10, 1FB0F), M(0x11, 1FB10), M(0x12, 1FB11), M(0x13, 1FB12), - M(0x14, 1FB13), /* lfblock */ M(0x16, 1FB14), M(0x17, 1FB15), - M(0x18, 1FB16), M(0x19, 1FB17), M(0x1a, 1FB18), M(0x1b, 1FB19), - M(0x1c, 1FB1A), M(0x1d, 1FB1B), M(0x1e, 1FB1C), M(0x1f, 1FB1D), - M(0x20, 1FB1E), M(0x21, 1FB1F), M(0x22, 1FB20), M(0x23, 1FB21), - M(0x24, 1FB22), M(0x25, 1FB23), M(0x26, 1FB24), M(0x27, 1FB25), - M(0x28, 1FB26), M(0x29, 1FB27), /* rtblock */ M(0x2b, 1FB28), - M(0x2c, 1FB29), M(0x2d, 1FB2A), M(0x2e, 1FB2B), M(0x2f, 1FB2C), - M(0x30, 1FB2D), M(0x31, 1FB2E), M(0x32, 1FB2F), M(0x33, 1FB30), - M(0x34, 1FB31), M(0x35, 1FB32), M(0x36, 1FB33), M(0x37, 1FB34), - M(0x38, 1FB35), M(0x39, 1FB36), M(0x3a, 1FB37), M(0x3b, 1FB38), - M(0x3c, 1FB39), M(0x3d, 1FB3A), M(0x3e, 1FB3B), /* block */ -#undef M {{030,024,022,021,027,030,000,000,000}, U(1FBB0) }, /* arrowheadptr */ {{000,012,033,000,033,012,000,000,000}, U(1FBBB) }, /* voided Greek cross */ {{000,037,001,005,001,037,000,000,000}, U(1FBBC) }, /* right open square dot */ @@ -2537,8 +2537,8 @@ static struct glyph { /* * Backward compatibility aliases. These are glyphs whose name has - * changed and where we want to keep the old name working. All of - * these were added in Bedstead 002.002. + * changed and where we want to keep the old name working. The first + * group were added in Bedstead 002.002. */ ALIAS("uni2126", "Omega"), ALIAS("uni2295", "circleplus"), @@ -2571,6 +2571,31 @@ static struct glyph { UA6(1FB35), UA6(1FB36), UA6(1FB37), UA6(1FB38), UA6(1FB39), UA6(1FB3A), UA6(1FB3B), #undef UA6 + + /* + * Further compatibility aliases, added in 002.007 when Unicode 16 + * gave proper code points for separated 6-cell mosaic graphics. + */ +#define A6(x, y) ALIAS("u1FB" #x ".sep6", "u1CE" #y) + /* */ A6(00, 51), A6(01, 52), A6(02, 53), + A6(03, 54), A6(04, 55), A6(05, 56), A6(06, 57), + A6(07, 58), A6(08, 59), A6(09, 5A), A6(0A, 5B), + A6(0B, 5C), A6(0C, 5D), A6(0D, 5E), A6(0E, 5F), + A6(0F, 60), A6(10, 61), A6(11, 62), A6(12, 63), + A6(13, 64), /* lfblk */ A6(14, 66), A6(15, 67), + A6(16, 68), A6(17, 69), A6(18, 6A), A6(19, 6B), + A6(1A, 6C), A6(1B, 6D), A6(1C, 6E), A6(1D, 6F), + A6(1E, 70), A6(1F, 71), A6(20, 72), A6(21, 73), + A6(22, 74), A6(23, 75), A6(24, 76), A6(25, 77), + A6(26, 78), A6(27, 79), /* rtblk */ A6(28, 7B), + A6(29, 7C), A6(2A, 7D), A6(2B, 7E), A6(2C, 7F), + A6(2D, 80), A6(2E, 81), A6(2F, 82), A6(30, 83), + A6(31, 84), A6(32, 85), A6(33, 86), A6(34, 87), + A6(35, 88), A6(36, 89), A6(37, 8A), A6(38, 8B), + A6(39, 8C), A6(3A, 8D), A6(3B, 8E), /* block */ + ALIAS("lfblock.sep6", "u1CE65"), + ALIAS("rtblock.sep6", "u1CE7A"), + ALIAS("block.sep6", "u1CE8F"), /* and finally */ {{037,021,021,021,021,021,037,000,000}, -1, ".notdef" },