font_file = open("Roboto-Regular.ttf", "rb")
raw_bytes = font_file.read()
font_file.close()

cfile = open("robotoFontData.h", "w")
cfile.write("\nnamespace lunarium\n{\n\tconst int RobotoDataSize = ")
cfile.write(str(len(raw_bytes)))
cfile.write(";\n\tconst unsigned char RobotoFontData[] =\n{\n\t")
cfile.write("(unsigned char)" + str(raw_bytes[0]))

for i,b in enumerate(raw_bytes[1:]):
    cfile.write(",")
    if i % 20 == 0:
        cfile.write("\n\t")
    cfile.write("(unsigned char)" + str(b))

cfile.write("\n};}")
cfile.close()