That seems like a good idea (maybe also add setFontMono(int width)?)
g.setFontSize(...)
That looks good. (and font packs could override Graphics.prototype.setFontSize)
try and find a font that would display the given text in the area. It might be good for messages...
On the one hand: that seems overly complicated. I think messages should just use a fixed size and handle overflow: that will happen anyway, and showing short messages in a larger font doesn't seem worth the hassle. (with variable character size, I think we'd need to "try all sizes until one fits", not sure that is a good idea¹)
On the other hand: if authors really want to use it, we don't want apps to "roll their own" if Bangle could do it for them.
¹ even though I wrote that code myself, regretting it now 😉
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.
That seems like a good idea (maybe also add
setFontMono(int width)
?)That looks good. (and font packs could override
Graphics.prototype.setFontSize
)On the one hand: that seems overly complicated. I think messages should just use a fixed size and handle overflow: that will happen anyway, and showing short messages in a larger font doesn't seem worth the hassle. (with variable character size, I think we'd need to "try all sizes until one fits", not sure that is a good idea¹)
On the other hand: if authors really want to use it, we don't want apps to "roll their own" if Bangle could do it for them.
¹ even though I wrote that code myself, regretting it now 😉