Add data for overriding 'aalt' sometimes

Not used yet.
This commit is contained in:
Ben Harris 2024-12-30 23:15:54 +00:00
parent 3a43d22b3d
commit a0e959cd37

View File

@ -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" },