From: Ben Harris Date: Thu, 19 Dec 2024 13:46:58 +0000 (+0000) Subject: Swap scripts and suffix members of struct gsub_feature X-Git-Tag: bedstead-3.251~64 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=fa50e22c98978443b8356169ffc20e039078d829;p=bedstead.git Swap scripts and suffix members of struct gsub_feature Every feature must have a scripts list, but "suffix" is only one way you might select lookups to generate. Putting it at the end makes it easier to leave it out. Indeed, our existing 'aalt' lookup omits it. This causes no change to the generated fonts. --- diff --git a/bedstead.c b/bedstead.c index 75f27eb..bbb002a 100644 --- a/bedstead.c +++ b/bedstead.c @@ -2679,22 +2679,22 @@ static struct glyph const *glyphs_by_name[NGLYPHS]; static struct gsub_feature { char const *tag; - char const *suffix; /* NULL for all alternative glyphs. */ #define SCRIPT_DFLT 0x01 #define SCRIPT_LATN 0x02 #define SCRIPT_ALL 0x03 unsigned int scripts; + char const *suffix; /* NULL for all alternative glyphs. */ char const *name; } const gsub_features[] = { - { "aalt", NULL, SCRIPT_ALL }, - { "smcp", ".sc", SCRIPT_LATN }, - { "c2sc", ".c2sc", SCRIPT_LATN }, - { "rtlm", ".rtlm", SCRIPT_ALL }, - { "ss01", ".saa5051", SCRIPT_ALL, "SAA5051" }, - { "ss02", ".saa5052", SCRIPT_ALL, "SAA5052" }, - { "ss04", ".saa5054", SCRIPT_ALL, "SAA5054" }, - { "ss14", ".sep4", SCRIPT_ALL, "4-cell separated graphics" }, - { "ss16", ".sep6", SCRIPT_ALL, "6-cell separated graphics" }, + { "aalt", SCRIPT_ALL }, + { "smcp", SCRIPT_LATN, ".sc" }, + { "c2sc", SCRIPT_LATN, ".c2sc" }, + { "rtlm", SCRIPT_ALL, ".rtlm" }, + { "ss01", SCRIPT_ALL, ".saa5051", "SAA5051" }, + { "ss02", SCRIPT_ALL, ".saa5052", "SAA5052" }, + { "ss04", SCRIPT_ALL, ".saa5054", "SAA5054" }, + { "ss14", SCRIPT_ALL, ".sep4", "4-cell separated graphics" }, + { "ss16", SCRIPT_ALL, ".sep6", "6-cell separated graphics" }, }; static int const ngsub_features =