Comments and attribution

This commit is contained in:
Thomas Lovén 2022-01-14 12:00:20 +01:00
parent 5e9d49e51e
commit 7026c9f54d

View File

@ -1,5 +1,8 @@
#!/bin/sh -e #!/bin/sh -e
# Download and convert the Unicode VGA font by Dmitry Yu. Bolkhovityanov
# https://www.inp.nsk.su/~bolkhov/files/fonts/univga/
mkdir -p /opt/external && cd /opt/external mkdir -p /opt/external && cd /opt/external
[ -f "uni-vga.tgz" ] || wget "https://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga.tgz" [ -f "uni-vga.tgz" ] || wget "https://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga.tgz"
[ -d "uni_vga" ] || tar -xf uni-vga.tgz [ -d "uni_vga" ] || tar -xf uni-vga.tgz
@ -33,7 +36,7 @@ with open("u_vga16.termfont.inc", "w") as fp:
fp.write(f"unsigned char font[{127-32}][16] =") fp.write(f"unsigned char font[{127-32}][16] =")
fp.write("{\n") fp.write("{\n")
for codepoint in range(32, 127): for codepoint in range(32, 127): # ONLY SAVE ASCII (for now)
fp.write("\t{" + ", ".join([f"0x{v:02X}" for v in chars.get(codepoint, [])]) + "},\n") fp.write("\t{" + ", ".join([f"0x{v:02X}" for v in chars.get(codepoint, [])]) + "},\n")
fp.write("};") fp.write("};")