@allObjects I don't think it's that easy. You'd have to add some really nasty code like g["setFont"+fontName]() in there. Having the callback allows you to make other changes too, like modifying the colour.
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.
@allObjects I don't think it's that easy. You'd have to add some really nasty code like
g["setFont"+fontName]()
in there. Having the callback allows you to make other changes too, like modifying the colour.