• Ahh - I think this is what you need - this code creates the font in Graphics directly: https://github.com/espruino/EspruinoDocs­/blob/master/modules/Font5x7Numeric7Seg.­js

    var gr = Graphics.createArrayBuffer(H,digits.leng­th*W+2,1,{msb:true});
    gr.setRotation(3,1);
    //...
    var font = gr.asImage().buffer;
    var widths = E.toString(widths);
    g.setFontCustom(font, 46, widths, H);
    

    If there's somewhere you think I can improve the docs around setFontCustom let me know though - I know it's not great.

    I guess there's the possibility that something that renders direct from flash could be built into Graphics, or that setFontCustom could have extra options?

About

Avatar for Gordon @Gordon started