Slightly re-organise comments around feature definitions

I was just looking at the code and finding it confusing.  Maybe more
comments will help, but maybe generating XML with enormous piles of
preprocessory is intrinsically confusing.
This commit is contained in:
Ben Harris 2026-01-30 00:40:05 +00:00
parent e0c668da75
commit ebe341b928

View File

@ -3082,6 +3082,9 @@ static struct alt_sub_override {
* Define all the Character Variant features using X macros. These
* are then used to create 'cvXX' features and grouped into 'ssXX'
* features.
*
* Where possible, Character Variant features have numbers that are 32
* less than the ASCII code of the base character.
*/
#define CV07(V) V("quotesingle", ".curly")
#define CV12(V) V("comma", ".left")
@ -3182,6 +3185,10 @@ static struct gsub_feature {
#define SUFFIXSUB1(base, suffix1, ...) SUB(base, base suffix1)
#define SUFFIXSUB2(base, suffix1, suffix2, ...) SUB(base, base suffix2)
#define SINGLESUB(x) "<SingleSubst>\n" x "</SingleSubst>\n"
/*
* Each stylistic set is defined as a set of character variant
* feature values using the CVxx() macros defined above.
*/
{ "ss01", SCRIPT_ALL, .name = "SAA5051",
.xml = SINGLESUB(CV07(SUFFIXSUB1) CV12(SUFFIXSUB1)
CV14(SUFFIXSUB1) CV26(SUFFIXSUB1)
@ -3214,8 +3221,8 @@ static struct gsub_feature {
#define CV3(base, a, b) CROSSALT3(base, base a, base b)
#define CV(...) GET_MACRO(__VA_ARGS__, CV3, CV2)(__VA_ARGS__)
/*
* Where possible, Character Variant features have numbers
* that are 32 less than the ASCII code of the base character.
* These construct the character-variant features out of the
* CVxx() macros above.
*/
{ "cv07", SCRIPT_ALL, .name = "apostrophe variants",
.subnames = { "straight", "curly" },