Hacker News new | ask | show | jobs
by todd3834 2704 days ago
I’ve often seen this solved by drawing a canvas at at least 2x the viewable size and then using css to force it to be smaller. This is because of retina displays. Very much like images these days. It is often a very easy thing to solve.
2 comments

The browser has a global for the DPR. If you multiply the reported dimensions by this value and keep the canvas stretched to 100% it should look crisp on any screen.

https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

This effectively ruins ClearType and other text AA methods.

In general <canvas> is acceptable for graphics but not for text.