chiark / gitweb /
Encode otherwise-unencoded glyphs in the private use area
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 1 May 2024 21:41:51 +0000 (22:41 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 1 May 2024 21:41:51 +0000 (22:41 +0100)
There are several glyphs in Bedstead that are not encoded at standard
Unicode code points.  In most cases this is because they're font
variants of other glyphs, and in one case it's a character that's
simply not in Unicode ("oldsheqel").  These can be accessed using
OpenType features or by glyph name, but not all applications make
those available or easy to use.  Giving all the glyphs code points
makes them usable (albeit with some ugliness) in pretty much any
application.

The code points I've used are in the "Reserved for font hacks" range
in the ConScript Unicode Registry, which should minimise their chances
of colliding with other useful things.

bedstead.c

index 2101ef2f8eb3604a0a20241d1aa55f45afc14b6e..1ec638fd8165978cd73fa8b031e55d95de369d0a 100644 (file)
@@ -367,10 +367,10 @@ static struct glyph {
  {{000,004,000,037,000,004,000,000,000}, 0x00f7, "divide" },
 
  /* Extra characters found in the German (SAA5051) character set */
- {{000,000,000,000,000,010,010,020,000}, -1, "comma.saa5051" },
- {{000,000,000,000,000,014,014,000,000}, -1, "period.saa5051" },
- {{000,000,000,010,000,000,010,000,000}, -1, "colon.saa5051" },
- {{000,000,010,000,000,010,010,020,000}, -1, "semicolon.saa5051" },
+ {{000,000,000,000,000,010,010,020,000}, 0xf1d0, "comma.saa5051" },
+ {{000,000,000,000,000,014,014,000,000}, 0xf1d1, "period.saa5051" },
+ {{000,000,000,010,000,000,010,000,000}, 0xf1d2, "colon.saa5051" },
+ {{000,000,010,000,000,010,010,020,000}, 0xf1d3, "semicolon.saa5051" },
  {{016,021,020,016,021,016,001,021,016}, 0x00a7, "section" },
  {{012,000,016,021,037,021,021,000,000}, 0x00c4, "Adieresis" },
  {{012,000,016,021,021,021,016,000,000}, 0x00d6, "Odieresis" },
@@ -384,8 +384,8 @@ static struct glyph {
  /* Extra characters found in the Swedish (SAA5052) character set */
  {{000,000,021,016,012,016,021,000,000}, 0x00a4, "currency" },
  {{002,004,037,020,036,020,037,000,000}, 0x00c9, "Eacute" },
- {{016,011,011,011,011,011,016,000,000}, -1, "D.saa5052" },
- {{010,010,010,010,010,010,017,000,000}, -1, "L.saa5052" },
+ {{016,011,011,011,011,011,016,000,000}, 0xf1d4, "D.saa5052" },
+ {{010,010,010,010,010,010,017,000,000}, 0xf1d5, "L.saa5052" },
  {{004,000,016,021,037,021,021,000,000}, 0x00c5, "Aring" },
  {{002,004,016,021,037,020,016,000,000}, 0x00e9, "eacute" },
  {{004,000,016,001,017,021,017,000,000}, 0x00e5, "aring" },
@@ -402,12 +402,12 @@ static struct glyph {
  {{012,000,014,004,004,004,016,000,000}, 0x00ef, "idieresis" },
  {{012,000,016,021,037,020,016,000,000}, 0x00eb, "edieresis" },
  {{004,012,016,021,037,020,016,000,000}, 0x00ea, "ecircumflex" },
- {{004,002,021,021,021,021,017,000,000}, -1, "ugrave.saa5054" },
+ {{004,002,021,021,021,021,017,000,000}, 0xf1d6, "ugrave.saa5054" },
  {{004,012,000,014,004,004,016,000,000}, 0x00ee, "icircumflex" },
  {{004,012,016,001,017,021,017,000,000}, 0x00e2, "acircumflex" },
- {{004,012,016,021,021,021,016,000,000}, -1, "ocircumflex.saa5054" },
+ {{004,012,016,021,021,021,016,000,000}, 0xf1d7, "ocircumflex.saa5054" },
  {{004,012,000,021,021,021,017,000,000}, 0x00fb, "ucircumflex" },
- {{000,000,017,020,020,020,017,002,006}, -1, "ccedilla.saa5054" },
+ {{000,000,017,020,020,020,017,002,006}, 0xf1d8, "ccedilla.saa5054" },
 
  /* Extra characters found in the Hebrew (SAA5056) character set */
  {{000,021,011,025,022,021,021,000,000}, U(05D0) }, /* alef */
@@ -437,7 +437,7 @@ static struct glyph {
  {{000,037,001,001,001,001,001,000,000}, U(05E8) }, /* resh */
  {{000,025,025,025,031,021,036,000,000}, U(05E9) }, /* shin */
  {{000,017,011,011,011,011,031,000,000}, U(05EA) }, /* tav */
- {{000,000,025,025,016,000,000,000,000}, -1, "oldsheqel" },
+ {{000,000,025,025,016,000,000,000,000}, 0xf1d9, "oldsheqel" },
 
  /* Extra characters found in the Cyrillic (SAA5057) character set */
  {{000,000,021,021,035,025,035,000,000}, U(044B) }, /* yeru */
@@ -1976,6 +1976,15 @@ static struct glyph {
  M(78), M(79), M(7A), M(7B), M(7C), M(7D), M(7E), M(7F),
 #undef M
 
+ /*
+  * Characters in the private use area are used for Bedstead glyphs
+  * that would otherwise be unencoded so as to make them easier to
+  * use. These encodings should be stable, but they do not use uniXXXX
+  * glyph names.  U+F1D0 to U+F1D9 are used above for glyphs from real
+  * character generators. U+F1C0 and U+F1C1 are used below for small
+  * caps glyphs.
+  */
  /* Alphabetic presentation forms */
  {{006,010,036,012,012,012,017,000,000}, 0xfb01, "fi" },
  {{006,012,012,036,012,012,017,000,000}, 0xfb02, "fl" },
@@ -2168,16 +2177,17 @@ static struct glyph {
  ALIAS("u.sc", "uni1D1C"), ALIAS("U.c2sc", "u.sc"),
  ALIAS("v.sc", "uni1D20"), ALIAS("V.c2sc", "v.sc"),
  ALIAS("w.sc", "uni1D21"), ALIAS("W.c2sc", "w.sc"),
- {{000,000,021,012,004,012,021,000,000}, -1, "x.sc" }, ALIAS("X.c2sc", "x.sc"),
+ {{000,000,021,012,004,012,021,000,000}, 0xf1c0, "x.sc" },
+ ALIAS("X.c2sc", "x.sc"),
  ALIAS("y.sc", "uni028F"), ALIAS("Y.c2sc", "y.sc"),
  ALIAS("z.sc", "uni1D22"), ALIAS("Z.c2sc", "z.sc"),
- {{000,000,016,021,022,021,026,000,000}, -1, "germandbls.sc" },
+ {{000,000,016,021,022,021,026,000,000}, 0xf1c1, "germandbls.sc" },
  ALIAS("uni1E9E.c2sc", "germandbls.sc"),
  
  ALIAS("ae.sc", "uni1D01"), ALIAS("AE.c2sc", "ae.sc"),
  ALIAS("eth.sc", "uni1D06"), ALIAS("Eth.c2sc", "eth.sc"),
  ALIAS("oe.sc", "uni0276"), ALIAS("OE.c2sc", "oe.sc"),
- {{000,000,020,036,021,036,020,000,000}, -1, "thorn.sc" },
+ {{000,000,020,036,021,036,020,000,000}, 0xf1c2, "thorn.sc" },
  ALIAS("Thorn.c2sc", "thorn.sc"),
 
  /*