summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-08-20 15:38:04 +0100
committerVincent Sanders <vince@kyllikki.org>2014-08-20 15:38:34 +0100
commita57278f574465b5d9ddd32b7d6da54258f47aba4 (patch)
tree0185441abf59bdd5e33bae174e7ae20c9f9765ed /framebuffer
parent2cf3525b006d3eaf45adb3648d29d4590fc9927d (diff)
downloadnetsurf-a57278f574465b5d9ddd32b7d6da54258f47aba4.tar.gz
netsurf-a57278f574465b5d9ddd32b7d6da54258f47aba4.tar.bz2
fix framebuffer internal font generation
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/convert_font.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/framebuffer/convert_font.c b/framebuffer/convert_font.c
index a71d81bc8..3cd9a91f3 100644
--- a/framebuffer/convert_font.c
+++ b/framebuffer/convert_font.c
@@ -337,7 +337,7 @@ bool generate_font_source(const char *path, struct font_data *data)
for (s = 0; s < 4; s++) {
- fprintf(fp, "const uint8_t %s_section_table[256] = {\n",
+ fprintf(fp, "static const uint8_t %s_section_table_c[256] = {\n",
var_lables[s]);
for (i = 0; i < 256; i++) {
@@ -355,7 +355,9 @@ bool generate_font_source(const char *path, struct font_data *data)
data->section_table[s][i]);
}
- fprintf(fp, "};\nconst uint16_t %s_sections[%i] = {\n",
+ fprintf(fp, "};\nconst uint8_t *%s_section_table = &%s_section_table_c[0];\n\n",
+ var_lables[s], var_lables[s]);
+ fprintf(fp, "static const uint16_t %s_sections_c[%i] = {\n",
var_lables[s], data->sec_count[s] * 256);
limit = data->sec_count[s] * 256;
@@ -371,10 +373,10 @@ bool generate_font_source(const char *path, struct font_data *data)
fprintf(fp, "0x%.4X, ", offset);
}
- fprintf(fp, "};\n\n");
+ fprintf(fp, "};\nconst uint16_t *%s_sections = &%s_sections_c[0];\n\n", var_lables[s], var_lables[s]);
}
- fprintf(fp, "const uint8_t font_glyph_data[%i] = {\n",
+ fprintf(fp, "static const uint8_t font_glyph_data_c[%i] = {\n",
(data->glyphs + 1) * 16);
fprintf(fp, "\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n"
@@ -396,7 +398,8 @@ bool generate_font_source(const char *path, struct font_data *data)
}
}
- fprintf(fp, "};\n\n");
+ fprintf(fp, "};\n");
+ fprintf(fp, "const uint8_t *font_glyph_data = &font_glyph_data_c[0];\n\n");
fclose(fp);