chiark / gitweb /
Convert 6-cell ".sep6" glyphs into compatibility aliases
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 26 Nov 2024 20:59:47 +0000 (20:59 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 26 Nov 2024 20:59:47 +0000 (20:59 +0000)
bedstead.c

index 9d928690bbbee29ff02f99c993186ee0b992ae7a..a8699912d3e80aec9e6d9cd08b33806ee9b8f5e6 100644 (file)
@@ -2565,9 +2565,9 @@ static struct glyph {
  {"\04\12\21\21\25\33\21\00\00", U(1FBCA) }, /* white chevron up */
 
  /*
-  * Backward compatibility aliases.  These are glyphs whose name has
-  * changed and where we want to keep the old name working.  The first
-  * group were added in Bedstead 002.002.
+  * Backward compatibility aliases.  These are glyphs whose name (and
+  * sometimes Unicode mapping) has changed and where we want to keep
+  * the old name working.  The first group were added in Bedstead 002.002.
   */
 #define COMPAT_ALIAS(alias, canonical)                 \
  {{.alias_of=canonical},-1,alias,IS_ALIAS|COMPAT}
@@ -2607,20 +2607,19 @@ static struct glyph {
  
  /*
   * Further compatibility aliases, added in 002.007 when Unicode 16
-  * gave proper code points for separated 6-cell mosaic graphics.  Not
-  * actually implemented as aliases because it's simpler to directly
-  * generate the glyphs.
+  * gave proper code points for separated 6-cell mosaic graphics.
   */
-#define M(u) { {0x ## u * 21 / 20 + 1}, -1, "u1FB" #u ".sep6", SEP6 }
- /* */  M(00), M(01), M(02), M(03), M(04), M(05), M(06),
- M(07), M(08), M(09), M(0A), M(0B), M(0C), M(0D), M(0E),
- M(0F), M(10), M(11), M(12), M(13),        M(14), M(15),
- M(16), M(17), M(18), M(19), M(1A), M(1B), M(1C), M(1D),
- M(1E), M(1F), M(20), M(21), M(22), M(23), M(24), M(25),
- M(26), M(27),        M(28), M(29), M(2A), M(2B), M(2C),
- M(2D), M(2E), M(2F), M(30), M(31), M(32), M(33), M(34),
- M(35), M(36), M(37), M(38), M(39), M(3A), M(3B),
-#undef M
+#define A(f,t)                                                         \
+ { .alias_of = "u1CE" #t, -1, "u1FB" #f ".sep6", IS_ALIAS | COMPAT }
+ /*    */ A(00,51),A(01,52),A(02,53),A(03,54),A(04,55),A(05,56),A(06,57),
+ A(07,58),A(08,59),A(09,5A),A(0A,5B),A(0B,5C),A(0C,5D),A(0D,5E),A(0E,5F),
+ A(0F,60),A(10,61),A(11,62),A(12,63),A(13,64),         A(14,66),A(15,67),
+ A(16,68),A(17,69),A(18,6A),A(19,6B),A(1A,6C),A(1B,6D),A(1C,6E),A(1D,6F),
+ A(1E,70),A(1F,71),A(20,72),A(21,73),A(22,74),A(23,75),A(24,76),A(25,77),
+ A(26,78),A(27,79),         A(28,7B),A(29,7C),A(2A,7D),A(2B,7E),A(2C,7F),
+ A(2D,80),A(2E,81),A(2F,82),A(30,83),A(31,84),A(32,85),A(33,86),A(34,87),
+ A(35,88),A(36,89),A(37,8A),A(38,8B),A(39,8C),A(3A,8D),A(3B,8E),
+#undef A
  COMPAT_ALIAS("lfblock.sep6", "u1CE65"),
  COMPAT_ALIAS("rtblock.sep6", "u1CE7A"),
  COMPAT_ALIAS("block.sep6", "u1CE8F"),