• Got it partly solved. I can at least draw it to screen letter by letter. I also mapped the fontchip as ordinary flash via SPIFLASH in board file so it is accesible via Flash module and it can be easily read. Then I found Graphics.asImage which works only when called with asImage("string") (not "object" due to vertical_byte:true ?) and I can draw it via drawImage. so e.g. to draw big digit "3" from the 40x64 font I do it like this:

    var f=require("Flash");
    var fg=Graphics.createArrayBuffer(40,64,1,{v­ertical_byte : true});
    fg.buffer=f.read(320,0x60000000+0x199e0e­+3*322);
    fg.buffer[0]=0;
    g.drawImage(fg.asImage("string"),0,0);
    

    So it works and I can make my own drawString letter by letter. May be even better for large clock numbers.

    Also looks like the first byte of each letter is real letter width so the font is in fact proportional (and I need to zero the data before drawing). Is there way to draw only part of larger image? The width is 40 but letter '1' is only 33 pixels wide. I don't see any way to take/draw only some part of the image both in Graphics.asImage and Graphics.drawImage. Maybe transparency could solve it too but there is no way to provide that either with asImage("string") or drawImage options.

About

Avatar for fanoush @fanoush started