From: Ben Harris Date: Wed, 24 Sep 2025 21:58:39 +0000 (+0100) Subject: Convert some 8-cell mosaic glyphs into aliases to 6-cell X-Git-Tag: bedstead-3.261~81 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=b4a690a5b6ea1409ecae8262d4ab6102d00d8973;p=bedstead.git Convert some 8-cell mosaic glyphs into aliases to 6-cell Because in Bedstead the cell boundaries of 8-cell mosaic glyphs are a superset of those for 6-cell mosaic glyphs, each of the existing 6-cell glyphs has an identical 8-cell glyph whose middle two rows of cells are identical. Thus, these 8-cell glyphs can be aliases for the corresponding 6-cell glyph. I've implemented this as a macro called A() that can be mixed in with the existing O() macros in the section of the glyphs table that generates U+1CD00..U+1CDE5, aliasing them to characters in U+1FB00..U+1FB3B. That makes the table even more confusing, but at least it's compact. --- diff --git a/bedstead.c b/bedstead.c index df0db87..f0e87d6 100644 --- a/bedstead.c +++ b/bedstead.c @@ -2724,39 +2724,47 @@ static struct glyph { M(8), M(9), M(A), M(B), M(C), M(D), M(E), M(F), #undef M #define O(x,u) { {0x ## x}, U(1CD ## u), MOS8 } + /* + * Because of where we put the cell boundaries, some 8-cell mosaic + * characters can be aliased to 6-cell ones. To make this less + * confusing (maybe), the A() macro has its arguments the opposite + * way around from ALIAS(). + */ +#define A(t,u) UALIAS(U(1CD ## u), "u1FB" #t) /* */ O(04,00), O(06,01),O(07,02), O(08,03),O(09,04), O(0B,05),O(0C,06),O(0D,07),O(0E,08), - O(10,09),O(11,0A),O(12,0B),O(13,0C), O(15,0D),O(16,0E),O(17,0F), + O(10,09),O(11,0A),O(12,0B),O(13,0C), A(04,0D),A(05,0E),A(06,0F), O(18,10),O(19,11),O(1A,12),O(1B,13),O(1C,14),O(1D,15),O(1E,16),O(1F,17), O(20,18),O(21,19),O(22,1A),O(23,1B),O(24,1C),O(25,1D),O(26,1E),O(27,1F), - /* */ O(29,20),O(2A,21),O(2B,22),O(2C,23),O(2D,24),O(2E,25),O(2F,26), + /* */ A(08,20),A(09,21),A(0A,22),O(2C,23),O(2D,24),O(2E,25),O(2F,26), O(30,27),O(31,28),O(32,29),O(33,2A),O(34,2B),O(35,2C),O(36,2D),O(37,2E), - O(38,2F),O(39,30),O(3A,31),O(3B,32),O(3C,33),O(3D,34),O(3E,35), - /* */ O(41,36),O(42,37),O(43,38),O(44,39),O(45,3A),O(46,3B),O(47,3C), + O(38,2F),O(39,30),O(3A,31),O(3B,32),A(0B,33),A(0C,34),A(0D,35), + /* */ A(10,36),A(11,37),A(12,38),O(44,39),O(45,3A),O(46,3B),O(47,3C), O(48,3D),O(49,3E),O(4A,3F),O(4B,40),O(4C,41),O(4D,42),O(4E,43),O(4F,44), - /* */ O(51,45),O(52,46),O(53,47),O(54,48), O(56,49),O(57,4A), + /* */ O(51,45),O(52,46),O(53,47),A(13,48), A(14,49),A(15,4A), O(58,4B),O(59,4C), O(5B,4D),O(5C,4E),O(5D,4F),O(5E,50), O(60,51),O(61,52),O(62,53),O(63,54),O(64,55),O(65,56),O(66,57),O(67,58), - O(68,59),O(69,5A),O(6A,5B),O(6B,5C),O(6C,5D),O(6D,5E),O(6E,5F),O(6F,60), + A(16,59),A(17,5A),A(18,5B),A(19,5C),O(6C,5D),O(6D,5E),O(6E,5F),O(6F,60), O(70,61),O(71,62),O(72,63),O(73,64),O(74,65),O(75,66),O(76,67),O(77,68), - O(78,69),O(79,6A),O(7A,6B),O(7B,6C),O(7C,6D),O(7D,6E),O(7E,6F),O(7F,70), - /* */ O(81,71),O(82,72),O(83,73),O(84,74),O(85,75),O(86,76),O(87,77), + O(78,69),O(79,6A),O(7A,6B),O(7B,6C),A(1A,6D),A(1B,6E),A(1C,6F),A(1D,70), + /* */ A(1F,71),A(20,72),A(21,73),O(84,74),O(85,75),O(86,76),O(87,77), O(88,78),O(89,79),O(8A,7A),O(8B,7B),O(8C,7C),O(8D,7D),O(8E,7E),O(8F,7F), - O(90,80),O(91,81),O(92,82),O(93,83),O(94,84),O(95,85),O(96,86),O(97,87), + O(90,80),O(91,81),O(92,82),O(93,83),A(22,84),A(23,85),A(24,86),A(25,87), O(98,88),O(99,89),O(9A,8A),O(9B,8B),O(9C,8C),O(9D,8D),O(9E,8E),O(9F,8F), /* */ O(A1,90),O(A2,91),O(A3,92),O(A4,93), O(A6,94),O(A7,95), - O(A8,96),O(A9,97), O(AB,98),O(AC,99),O(AD,9A),O(AE,9B), + A(26,96),A(27,97), A(28,98),O(AC,99),O(AD,9A),O(AE,9B), O(B0,9C),O(B1,9D),O(B2,9E),O(B3,9F),O(B4,A0),O(B5,A1),O(B6,A2),O(B7,A3), - O(B8,A4),O(B9,A5),O(BA,A6),O(BB,A7),O(BC,A8),O(BD,A9),O(BE,AA),O(BF,AB), - /* */ O(C1,AC),O(C2,AD),O(C3,AE),O(C4,AF),O(C5,B0),O(C6,B1),O(C7,B2), + O(B8,A4),O(B9,A5),O(BA,A6),O(BB,A7),A(29,A8),A(2A,A9),A(2B,AA),A(2C,AB), + /* */ A(2E,AC),A(2F,AD),A(30,AE),O(C4,AF),O(C5,B0),O(C6,B1),O(C7,B2), O(C8,B3),O(C9,B4),O(CA,B5),O(CB,B6),O(CC,B7),O(CD,B8),O(CE,B9),O(CF,BA), - O(D0,BB),O(D1,BC),O(D2,BD),O(D3,BE),O(D4,BF),O(D5,C0),O(D6,C1),O(D7,C2), + O(D0,BB),O(D1,BC),O(D2,BD),O(D3,BE),A(31,BF),A(32,C0),A(33,C1),A(34,C2), O(D8,C3),O(D9,C4),O(DA,C5),O(DB,C6),O(DC,C7),O(DD,C8),O(DE,C9),O(DF,CA), O(E0,CB),O(E1,CC),O(E2,CD),O(E3,CE),O(E4,CF),O(E5,D0),O(E6,D1),O(E7,D2), - O(E8,D3),O(E9,D4),O(EA,D5),O(EB,D6),O(EC,D7),O(ED,D8),O(EE,D9),O(EF,DA), + A(35,D3),A(36,D4),A(37,D5),A(38,D6),O(EC,D7),O(ED,D8),O(EE,D9),O(EF,DA), /* */ O(F1,DB),O(F2,DC),O(F3,DD),O(F4,DE), O(F6,DF),O(F7,E0), - O(F8,E1),O(F9,E2), O(FB,E3), O(FD,E4),O(FE,E5), + O(F8,E1),O(F9,E2), O(FB,E3), A(3A,E4),A(3B,E5), #undef O +#undef A UALIAS(U(1CEA0), "u1FB1E"), /* right half lower quarter block (octant-8) */ UALIAS(U(1CEA3), "u1FB0F"), /* left half lower quarter block (octant-7) */ UALIAS(U(1CEA8), "u1FB00"), /* left half upper quarter block (octant-1) */