So, I'm having trouble finding out how to fix the edginess of the text rendered with fillText function. The text looks fine if it is rendered with the DOM instead of the canvas however I need to render it using the canvas instead.
Edit: I found out what's wrong with the way I render the text. It was all about the animation loop as I didn't clear the canvas before re-rendering the text. So when I render the text once, it looks fine (text on top is rendered with DOM, bottom text rendered with canvas). But when I put it in an animation loop it becomes messed up (same kind of image but canvas text looks bad).