chiark / gitweb /
Swap scripts and suffix members of struct gsub_feature
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 19 Dec 2024 13:46:58 +0000 (13:46 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 29 Dec 2024 18:50:11 +0000 (18:50 +0000)
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.

bedstead.c

index 75f27eb1f94fa07e835580eee6c8fc056c9f3377..bbb002a95d80a48c87c7713621b248b929783387 100644 (file)
@@ -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 =