This is a custom font library. You can create your own font. Just use the matrix to set the drawing of the char. Use a dot a the begin of each line. The drawing for the letter 'F' can be '.PAC.FG'. Put the pen in P then a line to A and from A to C. Next, put the pen in F and draw a line to G.

f='.pac.fg' |
Sampe of use:
function _draw() cls(5) font:drawtext(3,10,'t⬇️his is a way to create custom',7) font:drawtext(3,20,'⬇️vector ⬆️font.',7) font:size(4,5) font:drawtext(11,52,'s⬇️ize matters!',1) font:drawtext(10,50,'s⬇️ize matters!',14) font:size(2) line(55,113,127,113,8) font:drawtext(56,105,'⬇️picoscope101.fr',7) end |



interesting coordinate system!
much easier than specifying coords (though less precise)
hum - performance wise I was expecting some kind of ‘compilation’ of the glyphs definitions.



You know this is quite nice. Now I would've =encoded= the font using letters as you have here, but I never considered having the letters also part of the input instead of using arrow keys and (O) to mark and draw vectors.
Gold Star for genius thinking here, @jihem.



[Please log in to post a comment]