Which board are you using? I just tried here on a Pixl and also a Pico and it seems ok:
>var g = Graphics.createArrayBuffer(8, 8, 1);
=Graphics: {
"buffer": new ArrayBuffer(8)
}
>g.drawString("X");
=undefined
>g.buffer.toString()
="5,5,2,5,5,0,0,0"
I'm not quite sure I understand about the centering - the default text is normally 4x5 characters so -2,-2 sounds ok, perhaps 1 pixel off depending how you choose to round.
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.
Which board are you using? I just tried here on a Pixl and also a Pico and it seems ok:
I'm not quite sure I understand about the centering - the default text is normally 4x5 characters so -2,-2 sounds ok, perhaps 1 pixel off depending how you choose to round.