I'm trying to draw 8-bit pixel text on an HTML5 canvas. I've tried:
_context['imageSmoothingEnabled'] = false;
_context['mozImageSmoothingEnabled'] = false;
_context['oImageSmoothingEnabled'] = false;
_context['webkitImageSmoothingEnabled'] = false;
_context['msImageSmoothingEnabled'] = false;
and some other things having to do with the HTML & CSS font face while googling for over an hour. This is the font-face:
@font-face {
font-family: "undertalefont";
src: url("bitops.ttf");
font-style: normal;
-webkit-font-smoothing: none;
}
When using it in HTML, it attempts to use an odd form of subpixel anti-aliasing. And it of renders the font as expected in image-editing programs.
So my question is, how do I stop this... (scaled to 200% to see the bad AA)
and make it pixel-perfectly crisp?
EDIT: I'm rendering the text with:
_context.fillStyle = "white";
_context.font = "24px 'undertalefont'";
_context.fillText("Font rendering.", 32, 20);