Hi - yes, this is because the font/alignment/colour/etc can be changed by whatever widgets are being drawn. Sometimes they even redraw themselves automatically (eg when the charger is plugged in the battery widget redraws).
To work around this it's good practice to use g.reset() in a function before you draw anything - it resets all the graphics settings to the default (without clearing the screen) so you you're working from a known state.
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.
Hi - yes, this is because the font/alignment/colour/etc can be changed by whatever widgets are being drawn. Sometimes they even redraw themselves automatically (eg when the charger is plugged in the battery widget redraws).
To work around this it's good practice to use
g.reset()
in a function before you draw anything - it resets all the graphics settings to the default (without clearing the screen) so you you're working from a known state.