mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[build] Update to using pb 3
Updating the build to the new version of bonnibel. This also includes some updates to make sure things keep working with LLVM 11.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
def parse_elf(filename):
|
||||
import struct
|
||||
with open(filename, 'rb') as elf:
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
for arg in sys.argv[1:]:
|
||||
parse_elf(arg)
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from fontpsf import PSF2
|
||||
|
||||
def print_header(filename):
|
||||
font = PSF2.load(filename)
|
||||
|
||||
print("#pragma once")
|
||||
print(f"// This file was autogenerated by psf_to_cpp.py from {font.filename}\n")
|
||||
|
||||
print(f"const uint8_t font_glyph_size = {font.charsize};")
|
||||
print(f"const uint8_t font_glyph_width = {font.dimension[0]};")
|
||||
print(f"const uint8_t font_glyph_height = {font.dimension[1]};")
|
||||
print(f"const uint16_t font_glyph_count = {font.count};\n")
|
||||
|
||||
print('const uint8_t font_glyph_data[] = {')
|
||||
|
||||
for glyph in font:
|
||||
print(" ", "".join([f"0x{b:02x}," for b in glyph.data]), end="")
|
||||
print(" // {}".format(glyph.description()))
|
||||
|
||||
print("};")
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
for filename in sys.argv[1:]:
|
||||
print_header(filename)
|
||||
Reference in New Issue
Block a user