static struct glyph const *glyphs_by_name[NGLYPHS];
+#define MAX_ALT_SUB_OVERRIDE 3
+static struct alt_sub_override {
+ char const *base;
+ char const *alt[MAX_ALT_SUB_OVERRIDE];
+} const aalt_overrides[] = {
+ { "D", { "D.c2sc", "D.serif", "D.narrow" } },
+ { "J", { "J.c2sc", "J.narrow", "J.narrow" } },
+ { "L", { "L.c2sc", "L.narrow", "L.narrow" } },
+ { "ccedilla", { "ccedilla.angular", "ccedilla.sc" } }, // maybe not?
+ { "colon", { "colon.leftsmall", "colon.leftsmall" } },
+ { "ocircumflex", { "ocircumflex.large", "ocircumflex.sc" } }, // maybe not?
+ { "question", { "question.open", "question.open" } },
+ { "semicolon", { "semicolon.left", "semicolon.left" } },
+ { "ugrave", { "ugrave.roundjoined", "ugrave.sc" } }, // maybe not?
+};
+
#define MAXSUBS 10
static struct gsub_feature {
char const *tag;
char const *suffix; /* NULL for all alternative glyphs. */
char const *subs[MAXSUBS]; /* Individual character substitutions. */
char const *name;
+ struct alt_sub_override const *overrides;
+ int noverrides;
} const gsub_features[] = {
- { "aalt", SCRIPT_ALL },
+ { "aalt", SCRIPT_ALL, .overrides = aalt_overrides,
+ .noverrides = sizeof(aalt_overrides) / sizeof(aalt_overrides[0]) },
{ "smcp", SCRIPT_LATN, .suffix = ".sc" },
{ "c2sc", SCRIPT_LATN, .suffix = ".c2sc" },
{ "rtlm", SCRIPT_ALL, .suffix = ".rtlm" },