- Home /
"Hinted Raster" font rendering has anti-aliasing/smoothing in it?
Greetings,
So we're trying to get Chinese to work in our game. We usually use Bitmap fonts but a Chinese bitmap would be at least a 2k texture which we can't afford. So we're switching to dynamic/ttf font for Chinese.
Our game is a pixel 2D game, so we need everything crisp. The problem with dynamic font is no matter what setting I choose in the font importer (even Hinted Raster), it sill shows some smoothing/anti-aliasing.
Any tips/thoughts/ideas how to make it NOT do that would be appreciated
PS: We're using NGUI and Unity 5.4.3p4
Here's a comparison screenshot of a Dynamic font with Hinted Raster and a Bitmap font.
Thanks
Answer by r8-Bit-Ape · Aug 31, 2017 at 10:10 AM
In the inspector you can create an editable copy of the font that allows you to change texture settings:
Edit: You need to change Character to Unicode to allow creation of the copy
Answer by vexe · May 17, 2017 at 07:23 PM
So it seems like it's the filter mode on the font texture but for whatever reason they don't let you change it. Changing it in code seems to work.
public Font DynamicFont;
[ContextMenu("Make It Crispy")]
void MakeItCrispy()
{
if (DynamicFont)
{
DynamicFont.material.mainTexture.filterMode = FilterMode.Point;
DynamicFont.material.mainTexture.anisoLevel = 0;
}
}
I'll keep this answer around un-accepted incase someone has a less hacky better way to do it.
Your answer
Follow this Question
Related Questions
Embedded font data: can users extract it without permission? 3 Answers
GUIText - how to set letter spacing? 2 Answers
Occasional crash when importing open type font 0 Answers
NGUI timer problem 1 Answer
Can't able to import font 0 Answers