Integral Types

This commit is contained in:
khodowany
2026-09-12 10:11:50 -07:00
parent 693e232957
commit 44e100985a
15 changed files with 80 additions and 85 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ def generate(font_path, output):
box = ', '.join(f'{v / units:.8f}F' for v in pen.bounds)
records.append(f' {{{codepoint}, {{{box}}}}},')
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text('#pragma once\n#include <array>\nnamespace vamp_zero::font_data {\n'
'struct glyph { int codepoint; std::array<float, 4> bounds; };\n'
output.write_text('#pragma once\n#include <array>\n#include <cstdint>\nnamespace vamp_zero::font_data {\n'
'struct glyph { std::int32_t codepoint; std::array<float, 4> bounds; };\n'
f'inline constexpr std::array<glyph, {len(records)}> glyphs = {{{{\n'
+ '\n'.join(records) + '\n}};\n}\n', encoding='ascii')