# Slate UI - How can I disable anti-aliasing on fonts?

**URL:** <https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516>\
**Category:** UI\
**Tags:** fonts, unreal-engine, Rendering, slate, UI, CPP, question\
**Created:** [February 28, 2015, 5:03pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516 "2015-02-28T17:03:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex444](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex444](https://forums.unrealengine.com/u/Alex444)\
**Post date:** [February 28, 2015, 5:03pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/1 "2015-02-28T17:03:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alex444](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex444](https://forums.unrealengine.com/u/Alex444)\
**Post date:** [February 28, 2015, 5:09pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/2 "2015-02-28T17:09:43Z")

</div>

Here is one solution, its not perfect but at least its not blurry anymore, and hey if your desperate its better than nothing.

In the file Engine\Shaders\SlateElementPixelShader.usf there is a method:

```
float4 GetFontElementColor( VertexOut InVertex )
{
	float4 OutColor = InVertex.Color;
	OutColor.a *= Texture2DSample_A8(ElementTexture, ElementTextureSampler, InVertex.TextureCoordinates.xy);
	return OutColor;
}

```

Insert an if statement so that it looks like:

```
float4 GetFontElementColor( VertexOut InVertex )
{
	float4 OutColor = InVertex.Color;
	OutColor.a *= Texture2DSample_A8(ElementTexture, ElementTextureSampler, InVertex.TextureCoordinates.xy);
	if( OutColor.a > 0.3921568627450980392156862745098 )
	{
		OutColor.a = 1;	// makes pixel white or coloured
	}
	else
	{
		OutColor.a = 0;	//makes pixel transparent
	}
	return OutColor;
}

```

Now run the editor and the relevant shaders will be rebuilt and cached.

Here is the result (see the attached file, the web page is scaleing the image down):

 ![31596-shader+comparsion.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/c/1/2c1b209725c4ca5fc5bf75fe15c12bc5f9ce15ec.png)

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.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 1, 2015, 9:46pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/3 "2015-03-01T21:46:08Z")

</div>

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:

```
FT_Render_Glyph( Slot, (WITH_EDITOR) ? FT_RENDER_MODE_MONO : FT_RENDER_MODE_NORMAL );

```

---

<div class="post-metadata">

**Author:** ![Alex444](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex444](https://forums.unrealengine.com/u/Alex444)\
**Post date:** [March 2, 2015, 11:27am UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/4 "2015-03-02T11:27:25Z")

</div>

Perfect. Thanks a lot Jamie.

---

<div class="post-metadata">

**Author:** ![Classyham](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Classyham](https://forums.unrealengine.com/u/Classyham)\
**Post date:** [March 15, 2018, 4:34pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/5 "2018-03-15T16:34:22Z")

</div>

Is there a new way of doing this in newer Engine version? The classes appear to have changed significantly and I believe this method no longer works.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 15, 2018, 5:05pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/6 "2018-03-15T17:05:54Z")

</div>

The `FT_Render_Glyph` calls are now in `FSlateFontRenderer::GetRenderDataInternal`. FreeType hasn’t changed, so it should still work AFAIK.

---

<div class="post-metadata">

**Author:** ![Classyham](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Classyham](https://forums.unrealengine.com/u/Classyham)\
**Post date:** [March 15, 2018, 5:20pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/7 "2018-03-15T17:20:17Z")

</div>

Please pardon me, but I cannot seem to find `FSlateFontRenderer::GetRenderDataInternal`anywhere 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.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 15, 2018, 5:20pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/8 "2018-03-15T17:20:49Z")

</div>

Which version are you using?

---

<div class="post-metadata">

**Author:** ![Classyham](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Classyham](https://forums.unrealengine.com/u/Classyham)\
**Post date:** [March 15, 2018, 5:23pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/9 "2018-03-15T17:23:09Z")

</div>

4.18 Sorry.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 15, 2018, 5:40pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/10 "2018-03-15T17:40:05Z")

</div>

Okay, in that version it was called `FSlateFontRenderer::GetRenderData`. `FSlateFontRenderer` is the class you want though, search for `FT_Render_Glyph` in there.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 15, 2018, 7:31pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/11 "2018-03-15T19:31:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![just\_player-123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@just\_player-123](https://forums.unrealengine.com/u/just_player-123)\
**Post date:** [July 14, 2023, 10:04pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/12 "2023-07-14T22:04:32Z")

</div>

Hello!!

Is there solution for current Unreal Engine 5.2.1? The codes provided above does not exists in both files.

Thanks in advance!!

---

<div class="post-metadata">

**Author:** ![HelloDisIsHakase](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HelloDisIsHakase](https://forums.unrealengine.com/u/HelloDisIsHakase)\
**Post date:** [February 13, 2026, 3:02pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/13 "2026-02-13T15:02:33Z")

</div>

Hi, it’s been some years, and this flag is not present in UE5.7. If it’s possible and simple enough, please add it back in when you have time. Otherwise, please ask someone else to make it an official feature (as a checkbox in the GUI), because this is an accessibility feature basically. I suspect most developers’ eyesight is not getting better over the years, and at some point it’s going to be missed by more and more devs.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [February 13, 2026, 3:52pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/14 "2026-02-13T15:52:46Z")

</div>

`Slate.EnableFontAntiAliasing` still exists in the latest UE5 code, and from what I can tell still sets the font rendering to monochromatic mode.

It did seem to work when I tested it locally by passing `-dcpvar=Slate.EnableFontAntiAliasing=0` to my editor.

You can also set that by adding this to your project’s Editor.ini:

```auto
[ConsoleVariables]
Slate.EnableFontAntiAliasing=0

```

---

<div class="post-metadata">

**Author:** ![HelloDisIsHakase](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HelloDisIsHakase](https://forums.unrealengine.com/u/HelloDisIsHakase)\
**Post date:** [February 13, 2026, 4:52pm UTC](https://forums.unrealengine.com/t/slate-ui-how-can-i-disable-anti-aliasing-on-fonts/308516/15 "2026-02-13T16:52:00Z")

</div>

Thank you very much! This is a lot more usable already.

I added these two lines to `Engine\Config\BaseEditor.ini` since I’ll be using this with every project.

Also I changed font files in `Engine\Content\Slate\Fonts` to match my preference.

Hopefully in the future this becomes a simple checkbox, because I was not able to find how to change this easily. Again, thanks for the help!
