Myself and a small handfull of people find anti-aliased font to look blury, strain our eyes and are hard to read for long periods of time. It is very frustrating.
The unreal editor (Slate UI) renders fonts anti-aliased and i have found no option to disable it.
I have spent several days playing with the source code but im a java programmer and there are a lot of classes here. Im really tired of it now. It could be something to do with slate font atlas generation. If anyone has a c++ fix or knows the exact class I need to look at, please let me know.
You can tweak the float constant to your preference, for now im going with this value.
Hopefully someone has a better solution that prevents the anti-aliasing in the first place instead of trying to fix it after the fact like this one.
Please let me know if you find this usefull.
Our font glyphs are generated by FreeType in the FFreeTypeInterface::GetRenderData function of FontCache.cpp.
You can disable the anti-aliasing that FreeType applies by forcing a monochrome output when calling FT_Render_Glyph (use FT_RENDER_MODE_MONO rather than FT_RENDER_MODE_NORMAL).
Please note that this will also affect games shipped with this source code, so you may want to limit the change to editor builds:
Please pardon me, but I cannot seem to find FSlateFontRenderer::GetRenderDataInternalanywhere within the solution. I have looked through FontCache.cpp as well as searching the whole solution to no avail. I am probably missing something really easy but I am relatively new to modifying engine code.
Okay, in that version it was called FSlateFontRenderer::GetRenderData. FSlateFontRenderer is the class you want though, search for FT_Render_Glyph in there.
This code path has rotted though, and no longer correctly renders monochromatic fonts.
I’ve fixed this, and added a CVar (Slate.EnableFontAntiAliasing) to control which font rendering method you want, however this won’t go out in a release until 4.20.
I could try and explain the change if you want to try and apply it, but it’s more complex than editing a few lines.