chiark / gitweb /
Don't emit <LookupType> elements
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 8 Jan 2025 01:53:24 +0000 (01:53 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 8 Jan 2025 01:58:21 +0000 (01:58 +0000)
TTX is quite capable of inferring the lookup type from the type of the
main child element of <Lookup>.  This should allow for specifying
different kinds of lookup using literal XML.

bedstead.c

index 8632cae0f0d187b2284de504ddbc54b1e4db48e8..31f46e61daf7398af6608852be4639a83c639935 100644 (file)
@@ -3635,19 +3635,16 @@ dogsub(void)
                printf("    <Lookup> <!-- '%s' -->\n", gsub_features[i].tag);
                if (gsub_features[i].suffix != NULL) {
                        /* Single lookup for all glyphs with a suffix. */
-                       TTXI("LookupType", 1);
                        TTXI("LookupFlag", 0);
                        printf("     <SingleSubst>\n");
                        dosinglesubs(gsub_features[i].suffix);
                        printf("     </SingleSubst>\n");
                } else if (gsub_features[i].xml != NULL) {
                        /* Raw XML for a substitution. */
-                       TTXI("LookupType", 1);
                        TTXI("LookupFlag", 0);
                        printf("%s", gsub_features[i].xml);
                } else {
                        /* All possible alternative glyphs. */
-                       TTXI("LookupType", 3);
                        TTXI("LookupFlag", 0);
                        printf("     <AlternateSubst>\n");
                        doaltsubs(gsub_features[i].noverrides,
@@ -3762,7 +3759,6 @@ dogpos(void)
        printf("  </FeatureList>\n");
        printf("  <LookupList>\n");
        printf("   <Lookup>\n");
-       TTXI("LookupType", 1);
        TTXI("LookupFlag", 0);
        /*
         * We have only a few dx/dh combinations, so it makes sense to