Add character variant for curly apostrophe (SAA5051/2)

Unicode takes the position that U+0027 APOSTROPHE is always a straight
apostrophe and is you want a curly one you should use U+2019 RIGHT
SINGLE QUOTATION MARK (or U+02BC MODIFIER LETTER APOSTROPHE but let's
not get into that here).  Bedstead generally follows that, putting the
SAA5050 straight apostrophe at U+0027 and the SAA5055 curly one at
U+2019.

Older character standards, though, conflated those two and treated the
difference between them as one of font design.  In particular, ETS 300
706: May 1997, "Enhanced Teletext specification" treats position 2/7 as
being the same character in all national sub-sets of the Latin G0
primary set.  When coverting Teletext data to Unicode, ZVBI maps 2/7 to
U+0027 whichever national sub-set is in use.

This means that to faithfully display Teletext data in the way that an
SAA5051/2 would, Bedstead needs to interpret U+0027 as a curly
apostrophe.  I have accomplished this by adding a new "apostrophe.curly"
alias and including that in the 'ss01' and 'ss02' Stylistic Sets.  It
also, of course, gains a new Character Variant feature, 'cv07', so that
you can turn the curly apostrophe on and off independently.

This does cause me to wonder whether there should be a stylistic set to
map U+0020..U+007E onto the SAA5055 glyphs.
This commit is contained in:
Ben Harris 2025-01-18 13:48:59 +00:00
parent c7ababa801
commit 9f2acba7bd
2 changed files with 10 additions and 2 deletions

View File

@ -102,6 +102,8 @@
saa5054: 4;
}
@character-variant {
apostrophe-default: 6 1;
apostrophe-curly: 6 2
comma-default: 12 1;
comma-left: 12 2;
period-default: 14 1;

View File

@ -520,6 +520,7 @@ static struct glyph {
*/
/* Basic Latin */
ALIAS("quotesingle.curly", "quoteright"),
ALIAS("A.c2sc", "uni1D00"),
ALIAS("B.c2sc", "uni0299"),
ALIAS("C.c2sc", "uni1D04"),
@ -2845,6 +2846,7 @@ static struct alt_sub_override {
* are then used to create 'cvXX' features and grouped into 'ssXX'
* features.
*/
#define CV07(V) V("quotesingle", ".curly")
#define CV12(V) V("comma", ".left")
#define CV14(V) V("period", ".large")
#define CV26(V) V("colon", ".leftsmall")
@ -2940,13 +2942,15 @@ static struct gsub_feature {
#define SUFFIXSUB2(base, suffix1, suffix2, ...) SUB(base, base suffix2)
#define SINGLESUB(x) "<SingleSubst>\n" x "</SingleSubst>\n"
{ "ss01", SCRIPT_ALL, .name = "SAA5051",
.xml = SINGLESUB(CV12(SUFFIXSUB1) CV14(SUFFIXSUB1) CV26(SUFFIXSUB1)
.xml = SINGLESUB(CV07(SUFFIXSUB1) CV12(SUFFIXSUB1)
CV14(SUFFIXSUB1) CV26(SUFFIXSUB1)
CV27(SUFFIXSUB1) CV31(SUFFIXSUB1)
CV38(SUFFIXSUB1) CV42(SUFFIXSUB1)
CV44(SUFFIXSUB1) CV74(SUFFIXSUB1)
CV84(SUFFIXSUB1)) },
{ "ss02", SCRIPT_ALL, .name = "SAA5052",
.xml = SINGLESUB(CV12(SUFFIXSUB1) CV14(SUFFIXSUB1) CV26(SUFFIXSUB1)
.xml = SINGLESUB(CV07(SUFFIXSUB1) CV12(SUFFIXSUB1)
CV14(SUFFIXSUB1) CV26(SUFFIXSUB1)
CV27(SUFFIXSUB1) CV31(SUFFIXSUB1)
CV38(SUFFIXSUB2) CV42(SUFFIXSUB1)
CV44(SUFFIXSUB1) CV74(SUFFIXSUB1)
@ -2968,6 +2972,8 @@ static struct gsub_feature {
* Where possible, Character Variant features have numbers
* that are 32 less than the ASCII code of the base character.
*/
{ "cv07", SCRIPT_ALL, .name = "apostrophe variants",
.xml = ALTSUB(CV07(CV2)) },
{ "cv12", SCRIPT_ALL, .name = "comma variants",
.xml = ALTSUB(CV12(CV2)) },
{ "cv14", SCRIPT_ALL, .name = "full-stop variants",