File tree 1 file changed +18
-13
lines changed
1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change 60
60
61
61
out = open (output , "w" )
62
62
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 " )
69
72
for c in range (0 , 255 ):
70
73
if None == fontCharacters [c ]:
71
- print >> out , " NULL,"
74
+ out . write ( " NULL,\n " )
72
75
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 " )
75
79
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 " )
80
85
81
86
out .close ()
You can’t perform that action at this time.
0 commit comments