Is it possible to make a pixelated bitmap font in node-canvas?

139 Views Asked by At

I've been recently working on a Node.js project that uses node-canvas module.

Although I have a problem. I want to completely disable the font smoothing (like you can do in Paint.net, Photoshop, Adobe Animate, etc), so that the font is pixelated and crisp.

Here's the picture of the text with the same font and size. The top one is rendered by node-canvas, while the bottom one is how I want it to look like (i.e. unsmoothed, crispy).

hi there

Does anyone know if it's possible or not?

1

There are 1 best solutions below

0
gmdshxdow On

Alright, I resolved the issue.

Making the crisp and pixelated bitmap font in node-canvas is impossible. However, I found another solution: I rendered every character of a font as images, and then wrote the script to put those onto the canvas.

Now it looks something like this:

enter image description here, which is exactly what I wanted.