Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement text rendering methods #1

Open
avindra opened this issue Jan 10, 2021 · 2 comments
Open

Implement text rendering methods #1

avindra opened this issue Jan 10, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@avindra
Copy link

avindra commented Jan 10, 2021

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

@avindra
Copy link
Author

avindra commented Jan 10, 2021

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.

@littledivy littledivy added the enhancement New feature or request label Jan 11, 2021
@littledivy
Copy link
Owner

👍 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants