From bac039f869f285a3cf9eb72cf7bf8ef29a952c0d Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 20 Sep 2025 22:23:14 +0100 Subject: [PATCH] Add old-style numerals I've designed new versions of 0, 1, and 2 that fit within the x-height. 6 and 8 don't change at all (and are unmapped). The other digits are all moved down by two pixels so their top edges are at the x-height and their bottom edges at the descender height. This is very simple (and much simpler than my previous attempts), but seems to be satisfactory. --- bedstead.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bedstead.c b/bedstead.c index 817768b..fc8b59f 100644 --- a/bedstead.c +++ b/bedstead.c @@ -531,6 +531,14 @@ static struct glyph { /* Basic Latin */ ALIAS("quotesingle.curly", "quoteright"), + {"\00\00\04\12\21\12\04\00\00", -1, "zero.onum" }, + {"\00\00\04\14\04\04\16\00\00", -1, "one.onum" }, + {"\00\00\36\01\16\20\37\00\00", -1, "two.onum" }, + {"\00\00\37\01\02\06\01\21\16", -1, "three.onum" }, + {"\00\00\02\06\12\22\37\02\02", -1, "four.onum" }, + {"\00\00\37\20\36\01\01\21\16", -1, "five.onum" }, + {"\00\00\37\01\02\04\10\10\10", -1, "seven.onum" }, + {"\00\00\16\21\21\17\01\02\14", -1, "nine.onum" }, ALIAS("A.c2sc", "uni1D00"), ALIAS("B.c2sc", "uni0299"), ALIAS("C.c2sc", "uni1D04"), @@ -3030,6 +3038,7 @@ static struct gsub_feature { { "smcp", SCRIPT_LATN, .suffix = ".sc" }, { "c2sc", SCRIPT_LATN, .suffix = ".c2sc" }, { "rtlm", SCRIPT_ALL, .suffix = ".rtlm" }, + { "onum", SCRIPT_ALL, .suffix = ".onum" }, #define SUB(in, out) "\n" #define SUFFIXSUB1(base, suffix1, ...) SUB(base, base suffix1) #define SUFFIXSUB2(base, suffix1, suffix2, ...) SUB(base, base suffix2) -- 2.30.2