gdisp: Re-introduce uGFX types in font encoder output

This commit is contained in:
Joel Bodenmann 2024-09-18 05:09:36 +02:00
parent ba776e85fe
commit bb4fa18502
2 changed files with 7 additions and 7 deletions

View File

@ -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);
}
}

View File

@ -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)