From ebe341b9282c2a23f507a4b298863f2f9325b72d Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 30 Jan 2026 00:40:05 +0000 Subject: [PATCH] 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. --- bedstead.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bedstead.c b/bedstead.c index a050b7d..63df6e9 100644 --- a/bedstead.c +++ b/bedstead.c @@ -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) "\n" x "\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" }, -- 2.30.2