int height = font.glyphs[0].height;
int max_width = width;
int max_height = height;
- int[128] pos = { -1 ... };
+ int[128] pos = { 0 ... };
int[...] bytes;
bool fixed_size = true;
if (pos[i] == -1)
pos[i] = pos[font.default_char];
- fprintf(out, "#include \"ao_draw.h\"\n");
+ fprintf(out, "#include <ao_draw.h>\n");
fprintf(out, "static const uint8_t %s_bytes[%d] = {", font_name, dim(bytes));
for (int b = 0; b < dim(bytes); b++) {
if ((b & 15) == 0)
fprintf(out, "\t.max_height = %d,\n", max_height);
fprintf(out, "\t.ascent = %d,\n", font.ascent);
fprintf(out, "};\n");
+ int max_stride = (max_width + 31) >> 5;
+ fprintf(out, "__asm__(\".balign 4\\n.comm ao_glyph_temp 0x%x\");\n", max_stride * max_height * 4);
}
string