+
+ fprintf(out, "\n# Code point mapping:\n");
+ fprintf(out, "# code index\n");
+ for(i=0; i<font->n_glyphs; ++i)
+ {
+ const Glyph *g = &font->glyphs[i];
+ fprintf(out, "code %u %u\n", g->code, g->index);
+ }
+
+ fprintf(out, "\n# Metrics info:\n");
+ fprintf(out, "# index width height offset_x offset_y advance\n");
+ for(i=0; i<font->n_glyphs; ++i)
+ {
+ const Glyph *g = &font->glyphs[i];
+ int b = g->image.border;
+ fprintf(out, "metrics %u %u %u %d %d %d\n", g->index, g->image.w-2*b, g->image.h-2*b, g->offset_x+b, g->offset_y+b, g->advance);
+ }
+