Integral Types
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user