File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed
Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change 6060
6161out = open (output , "w" )
6262
63- print >> out , "#include \" Font.h\" "
64- print >> out
65- print >> out , "const struct Font %s = {" % ( name )
66- print >> out , " %d," % ( fontWidth )
67- print >> out , " %d," % ( fontHeight )
68- print >> out , " (const uint8_t*[]){"
63+ out .write ("#include \" Font.h\" \n " )
64+ out .write ("\n " )
65+ out .write ("const struct Font %s = {" % ( name ))
66+ out .write ("\n " )
67+ out .write (" %d," % ( fontWidth ))
68+ out .write ("\n " )
69+ out .write (" %d," % ( fontHeight ))
70+ out .write ("\n " )
71+ out .write (" (const uint8_t*[]){\n " )
6972for c in range (0 , 255 ):
7073 if None == fontCharacters [c ]:
71- print >> out , " NULL,"
74+ out . write ( " NULL,\n " )
7275 else :
73- print >> out , " // %s" % (fontCharacterNames [c ])
74- print >> out , " (const uint8_t[]){"
76+ out .write (" // %s" % (fontCharacterNames [c ]))
77+ out .write ("\n " )
78+ out .write (" (const uint8_t[]){\n " )
7579 for i in range (0 , fontHeight ):
76- print >> out , " 0b%s," % ('{0:08b}' .format (fontCharacters [c ][i ]))
77- print >> out , " },"
78- print >> out , " }"
79- print >> out , "};"
80+ out .write (" 0b%s," % ('{0:08b}' .format (fontCharacters [c ][i ])))
81+ out .write ("\n " )
82+ out .write (" },\n " )
83+ out .write (" }\n " )
84+ out .write ("};\n " )
8085
8186out .close ()
You can’t perform that action at this time.
0 commit comments