Yes, it's a bit confusing. Basically it's because the font as drawn in the string has the fonts one after the other vertically, but the custom font has them one after the other horizontally.
If that was swapped the code would be stupidly simple.
col&3 is the X coordinate in each character
The remainder is working out where to get the Y coordinate of each character from
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, it's a bit confusing. Basically it's because the font as drawn in the string has the fonts one after the other vertically, but the custom font has them one after the other horizontally.
If that was swapped the code would be stupidly simple.
col&3
is the X coordinate in each characterThere's actually a much nicer way of doing this, which the 7 segments fonts use to create themselves - the code for it is in the comments of the font: https://github.com/espruino/EspruinoDocs/blob/master/modules/Font5x7Numeric7Seg.js#L45-L62
You could ignore all the 7 segment stuff and just load an image right onto the Graphics instance using the image converter
Also worth checking out Matt's font converter: http://ebfc.mattbrailsford.com/