chiark / gitweb /
Add old-style numerals
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 20 Sep 2025 21:23:14 +0000 (22:23 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sat, 20 Sep 2025 22:30:35 +0000 (23:30 +0100)
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

index 817768bfd875f969c7b37f66bb281939033e045a..fc8b59f4c43ea29d2af4214d159a47c47c0bbbc2 100644 (file)
@@ -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) "<Substitution in='" in "' out='" out "'/>\n"
 #define SUFFIXSUB1(base, suffix1, ...) SUB(base, base suffix1)
 #define SUFFIXSUB2(base, suffix1, suffix2, ...) SUB(base, base suffix2)