From bb4fa185029a4bf8b9c015b498375c1c91dcd605 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 18 Sep 2024 05:09:36 +0200 Subject: [PATCH] gdisp: Re-introduce uGFX types in font encoder output --- tools/mcufontencoder/src/export_bwfont.cc | 6 +++--- tools/mcufontencoder/src/export_rlefont.cc | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/mcufontencoder/src/export_bwfont.cc b/tools/mcufontencoder/src/export_bwfont.cc index 9069bd1e..769da04f 100644 --- a/tools/mcufontencoder/src/export_bwfont.cc +++ b/tools/mcufontencoder/src/export_bwfont.cc @@ -134,12 +134,12 @@ static void encode_character_range(std::ostream &out, } offsets.push_back(data.size() / stride); - write_const_table(out, data, "uint8_t", "mf_bwfont_" + name + "_glyph_data_" + std::to_string(range_index), 1); + write_const_table(out, data, "gU8", "mf_bwfont_" + name + "_glyph_data_" + std::to_string(range_index), 1); if (!constant_width) { - write_const_table(out, offsets, "uint16_t", "mf_bwfont_" + name + "_glyph_offsets_" + std::to_string(range_index), 1, 4); - write_const_table(out, widths, "uint8_t", "mf_bwfont_" + name + "_glyph_widths_" + std::to_string(range_index), 1); + write_const_table(out, offsets, "gU16", "mf_bwfont_" + name + "_glyph_offsets_" + std::to_string(range_index), 1, 4); + write_const_table(out, widths, "gU8", "mf_bwfont_" + name + "_glyph_widths_" + std::to_string(range_index), 1); } } diff --git a/tools/mcufontencoder/src/export_rlefont.cc b/tools/mcufontencoder/src/export_rlefont.cc index e700c84b..68d789f7 100644 --- a/tools/mcufontencoder/src/export_rlefont.cc +++ b/tools/mcufontencoder/src/export_rlefont.cc @@ -36,8 +36,8 @@ static void encode_dictionary(std::ostream &out, } offsets.push_back(data.size()); - write_const_table(out, data, "uint8_t", "mf_rlefont_" + name + "_dictionary_data", 1); - write_const_table(out, offsets, "uint16_t", "mf_rlefont_" + name + "_dictionary_offsets", 1, 4); + write_const_table(out, data, "gU8", "mf_rlefont_" + name + "_dictionary_data", 1); + write_const_table(out, offsets, "gU16", "mf_rlefont_" + name + "_dictionary_offsets", 1, 4); } // Encode the data tables for a single character range. @@ -78,8 +78,8 @@ static void encode_character_range(std::ostream &out, } } - write_const_table(out, data, "uint8_t", "mf_rlefont_" + name + "_glyph_data_" + std::to_string(range_index), 1); - write_const_table(out, offsets, "uint16_t", "mf_rlefont_" + name + "_glyph_offsets_" + std::to_string(range_index), 1, 4); + write_const_table(out, data, "gU8", "mf_rlefont_" + name + "_glyph_data_" + std::to_string(range_index), 1); + write_const_table(out, offsets, "gU16", "mf_rlefont_" + name + "_glyph_offsets_" + std::to_string(range_index), 1, 4); } void write_source(std::ostream &out, std::string name, const DataFile &datafile)