From: Ben Harris Date: Sat, 16 Nov 2024 11:22:21 +0000 (+0000) Subject: Emit OpenType tables in a more logical order X-Git-Tag: bedstead-3.246~31 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=ac1a68d964c0f10c057d90dcb8f98013a497b0da;p=bedstead.git Emit OpenType tables in a more logical order TTX doesn't actually care what order we emit tables in: it will always put them into the recommended order. So I've made the order something that works correctly and that doesn't look too silly in TTX's console output. --- diff --git a/bedstead.c b/bedstead.c index e7f0aaa..13e6ca5 100644 --- a/bedstead.c +++ b/bedstead.c @@ -3101,13 +3101,6 @@ main(int argc, char **argv) NAME(NAMEBASE_GSUB + i, gsub_features[i].name); printf(" \n"); - printf(" \n"); - docmap(0, 3, 4); /* Unicode 2.0+, BMP only */ - docmap(0, 4, 12); /* Unicode 2.0+, full repertoire */ - docmap(3, 1, 4); /* Windows Unicode, BMP only */ - docmap(3, 10, 12); /* Windows Unicode, full repertoire */ - printf(" \n"); - printf(" \n"); TTXS("formatType", "3.0"); TTXS("italicAngle", "0.0"); @@ -3123,7 +3116,20 @@ main(int argc, char **argv) qsort(glyphs_by_name, nglyphs, sizeof(glyphs_by_name[0]), &compare_glyphs_by_name); + printf(" \n"); + for (i = 0; i < nglyphs; i++) + printf(" \n", glyphs[i].name); + printf(" \n"); + + printf(" \n"); + docmap(0, 3, 4); /* Unicode 2.0+, BMP only */ + docmap(0, 4, 12); /* Unicode 2.0+, full repertoire */ + docmap(3, 1, 4); /* Windows Unicode, BMP only */ + docmap(3, 10, 12); /* Windows Unicode, full repertoire */ + printf(" \n"); + dogpos(); /* Must be before 'CFF ' because it uses glyph bitmaps. */ + dogsub(); printf(" \n"); TTXI("major", 1); TTXI("minor", 0); @@ -3182,17 +3188,12 @@ main(int argc, char **argv) printf(" \n"); printf(" \n"); printf(" \n"); - printf(" \n"); - for (i = 0; i < nglyphs; i++) - printf(" \n", glyphs[i].name); - printf(" \n"); printf(" \n"); for (i = 0; i < nglyphs; i++) printf(" \n", glyphs[i].name, (int)(XSIZE * XPIX), (int)realglyph(&glyphs[i])->left_sidebearing); printf(" \n"); - dogsub(); printf("\n"); return EXIT_SUCCESS; }