drawille
drawille copied to clipboard
Implement text rendering methods
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeText https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText
If we ignore ctx.font
to start with, we don't need to worry about font size or a specific font, as terminals generally use the same font and font-size for everything.
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font
I started testing drawille in my snake game here:
https://github.com/avindra/snake/blob/src/src/tty.ts https://github.com/avindra/snake/blob/b7604e1c189ae160e76c06f3d53b35a89aa44baf/Makefile#L13
I might take a stab at it if I get around to hacking more snake.
:+1: for this. It seems to be an easy task looking at how asciimoo/drawille
does it - https://github.com/asciimoo/drawille/blob/166fe0ceed4c13ab0c25505fd9dd72e9e7b56d66/drawille.py#L168-L177