static struct glyph const *glyphs_by_name[NGLYPHS];
+static struct gsub_lookup {
+ char const *tag;
+ char const *suffix;
+#define SCRIPT_DFLT 0x01
+#define SCRIPT_LATN 0x02
+#define SCRIPT_ALL 0x03
+ unsigned int scripts;
+ char const *name;
+} const gsub_lookups[] = {
+ { "aalt", NULL, SCRIPT_ALL },
+ { "smcp", "sc", SCRIPT_LATN },
+ { "c2sc", "c2sc", SCRIPT_LATN },
+ { "rtlm", "rtlm", SCRIPT_ALL },
+ { "ss01", "saa5051", SCRIPT_ALL, "SAA5051" },
+ { "ss02", "saa5052", SCRIPT_ALL, "SAA5052" },
+ { "ss04", "saa5054", SCRIPT_ALL, "SAA5054" },
+ { "ss14", "sep4", SCRIPT_ALL, "4-cell separated graphics" },
+ { "ss16", "sep6", SCRIPT_ALL, "6-cell separated graphics" },
+};
+
+#define NGSUB_LOOKUPS (sizeof(gsub_lookups) / sizeof(gsub_lookups[0]))
+
static void dochar(struct glyph *g);
static void dochar_plotter(struct glyph *g);
static void domosaic(struct glyph *g);
NAME(5, "Version " VERSION);
NAME(6, fullname_to_fontname(get_fullname()));
/* Stylistic set names. */
- NAME(0x101, "SAA5051");
- NAME(0x102, "SAA5052");
- NAME(0x104, "SAA5054");
- NAME(0x114, "4-cell separated graphics");
- NAME(0x116, "6-cell separated graphics");
+#define NAMEBASE_GSUB 0x100
+ for (i = 0; i < NGSUB_LOOKUPS; i++)
+ if (gsub_lookups[i].name != NULL)
+ NAME(NAMEBASE_GSUB + i, gsub_lookups[i].name);
printf(" </name>\n");
printf(" <cmap><tableVersion version='0'/>\n");