chiark / gitweb /
Re-order OpenType lookups to be more sensible
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 2 Jun 2024 23:50:38 +0000 (00:50 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 2 Jun 2024 23:50:38 +0000 (00:50 +0100)
The small-caps and 'rtlm' lookups now come before the stylistic sets.
This is appropriate because the former make changes to the semantics
of characters and so should take priority over mere stylistic changes.
'palt' comes last because it can only reasonably be applied to the
actual glyphs being rendered.

bedstead.c

index bd074343d0a8230641665bcf99ae525a3d682efa..9b5ced17396a2506781b7c6ef91530c800e554c3 100644 (file)
@@ -2685,6 +2685,15 @@ main(int argc, char **argv)
        printf("EndPrivate\n");
        printf("Lookup: 3 0 0 \"aalt: all alternates\" {\"aalt\"} "
            "['aalt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
+       printf("Lookup: 1 0 0 \"smcp: lower-case to small caps\" "
+            "{\"smcp\" (\"sc\")} "
+           "['smcp' ('latn' <'dflt'>)]\n");
+       printf("Lookup: 1 0 0 \"c2sc: upper-case to small caps\" "
+           "{\"c2sc\" (\"c2sc\")} "
+           "['c2sc' ('latn' <'dflt'>)]\n");
+       printf("Lookup: 1 0 0 \"rtlm: right-to-left mirrored forms\" "
+           "{\"rtlm\" (\"rtlm\")} "
+           "['rtlm' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
        printf("Lookup: 1 0 0 \"ss01: SAA5051 forms\" {\"ss01\" (\"saa5051\")} "
            "['ss01' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
        printf("OtfFeatName: 'ss01' 1033 \"SAA5051\"\n");
@@ -2704,15 +2713,6 @@ main(int argc, char **argv)
        printf("OtfFeatName: 'ss16' 1033 \"6-cell separated graphics\"\n");
        printf("Lookup: 257 0 0 \"palt: proportional metrics\" {\"palt\"} "
            "['palt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
-       printf("Lookup: 1 0 0 \"smcp: lower-case to small caps\" "
-            "{\"smcp\" (\"sc\")} "
-           "['smcp' ('latn' <'dflt'>)]\n");
-       printf("Lookup: 1 0 0 \"c2sc: upper-case to small caps\" "
-           "{\"c2sc\" (\"c2sc\")} "
-           "['c2sc' ('latn' <'dflt'>)]\n");
-       printf("Lookup: 1 0 0 \"rtlm: right-to-left mirrored forms\" "
-           "{\"rtlm\" (\"rtlm\")} "
-           "['rtlm' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
        printf("BeginChars: %d %d\n", 0x110000 + extraglyphs, nglyphs);
        extraglyphs = 0;
        for (i = 0; i < nglyphs; i++)