static void domosaic4(unsigned code, bool sep);
static void doalias(char const *alias_of);
static void dopanose(void);
+static void docmap(int pid, int eid, int format);
static void glyph_complement(void);
static void bdf_gen(int size);
NAME(0x114, "4-cell separated graphics");
NAME(0x116, "6-cell separated graphics");
printf(" </name>\n");
+
+ printf(" <cmap>\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(" </cmap>\n");
/* printf("FontName: %s\n", fullname_to_fontname(get_fullname())); */
/* printf("FullName: %s\n", get_fullname()); */
/* printf("FamilyName: Bedstead\n"); */
panose[5], panose[6], panose[7], panose[8], panose[9]);
}
+static void
+docmap(int pid, int eid, int format)
+{
+ int i;
+ long limit = 0x10000;
+
+ printf(" <cmap_format_%d platformID='%d' platEncID='%d' language='0'",
+ format, pid, eid);
+ if (format == 12) {
+ limit = 0x110000;
+ /* TTX will recalculate these, but insists we give them. */
+ printf(" format='12' reserved='0' length='0' nGroups='0'");
+ }
+ printf(">\n");
+ for (i = 0; i < nglyphs; i++)
+ if (glyphs[i].unicode >= 0 &&
+ glyphs[i].unicode < limit)
+ printf(" <map code='0x%lx' name='%s'/>\n",
+ (long)glyphs[i].unicode, glyphs[i].name);
+ printf(" </cmap_format_%d>\n", format);
+}
+
static void
dopalt(struct glyph const *g)
{