Managing an aliased text

I have a bitmap font: Bitmap font. I tried to disable anti-aliasing with various settings and I did manage it, but there’s a warping issue. Text is in an item that moves across Canvas following a GameObject (ScreenToWorld etc.)

Lets take letter E as an example, it has a vertical line on the left side. If the line is less than 1 pixel wide it simply disappears. On the other hand if the width of pixel is supposed to be 1.6 pixels, it draws 2 pixels, which makes it look asymmetrical compared to rest of the letter (as if I resized it using Paint).

Setting Canvas mode Screen Space - Overlay and enabling “Pixel Perfect” renders, eh result:

5896040--628889--dpoo.png 5896040--628895--goofey.png

The text is either too warped, or is chopped up. The font’s native size is 12 and when I set it this size I encounter same problems. This applies to every other pixel font.

How can I get bitmap font to render crisp, with consistent size, without getting chopped up, without having weird warps and without having it anti-aliased?

I’m sure there’s like 9.1237814712732173812123 font size I could set it to and it will work, but isn’t there a Unity version of doing this?

If this pixel font was designed to be 12 pixels then it has to be displayed at 1:1 or multiples of 12 otherwise, it will get distorted.

See the following post from last week as it contains additional information.

1 Like