In this case I'd be happy with non flat string - the #2002[r1,l0] String [122 blocks] one. So something like E.toString(buffer,false) like E.getAddressOf() would probably do.
Hmm but it is already taken, E.toString("Hello",false) gives "Hello\0".
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.
I now just return whole Graphics from createFont and here is copy of session where E.toString fails, no asImage used this time
I guess the main issue is that https://www.espruino.com/Reference#l_E_toString says "Returns A String (or undefined if a Flat String cannot be created)"
In this case I'd be happy with non flat string - the
#2002[r1,l0] String [122 blocks]
one. So something like E.toString(buffer,false) like E.getAddressOf() would probably do.Hmm but it is already taken,
E.toString("Hello",false)
gives"Hello\0"
.