The sheetOffset was ignored since the position variable was 0 always. In some games this was adding garbage to the beginning of the fonts.
The second fix is for generating fonts with format A4. In that case, the division of data_pos by 2 may get a float instead of an integer so you couldn't use that variable in data[data_pos]. I replace the division operator with a integer division.
The
sheetOffset
was ignored since theposition
variable was 0 always. In some games this was adding garbage to the beginning of the fonts.The second fix is for generating fonts with format A4. In that case, the division of
data_pos
by 2 may get a float instead of an integer so you couldn't use that variable indata[data_pos]
. I replace the division operator with a integer division.