From: Ben Harris Date: Mon, 30 Dec 2024 23:15:54 +0000 (+0000) Subject: Add data for overriding 'aalt' sometimes X-Git-Tag: bedstead-3.251~51 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=a0e959cd37d70079d614368bcff8924d52236020;p=bedstead-debian.git Add data for overriding 'aalt' sometimes Not used yet. --- diff --git a/bedstead.c b/bedstead.c index 4f8bbe5..f351431 100644 --- a/bedstead.c +++ b/bedstead.c @@ -2693,6 +2693,22 @@ static int const nglyphs = NGLYPHS; 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; @@ -2703,8 +2719,11 @@ static struct gsub_feature { 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" },