# Support for Thai text in editor

**URL:** <https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine\
**Created:** [April 16, 2019, 11:40am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295 "2019-04-16T11:40:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_tawan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_tawan](https://forums.unrealengine.com/u/mr_tawan)\
**Post date:** [April 16, 2019, 11:40am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/1 "2019-04-16T11:40:13Z")

</div>

I’m currently learning UE4. And in process, I’ve run accross the issue that the editor does not support Thai text properly. It basically displays 'Tofu’s in the field.

[https://forums.unrealengine.com/filedata/fetch?filedataid=162328&type=thumb](https://forums.unrealengine.com/filedata/fetch?filedataid=162328&type=thumb)

After I’ve played around a little bit, I found that the renderer does support rendering Thai text in the field, but there is no Thai font ships with the engine. I can’t find a way to add fonts to the editor, I ended up replacing DroidSansFallback.ttf with font likes DroidSansThai.ttf (which would breaks other non-latin languages). The editor then displays Thai text properly.

[https://forums.unrealengine.com/filedata/fetch?filedataid=162330&type=thumb](https://forums.unrealengine.com/filedata/fetch?filedataid=162330&type=thumb)

Since this is relatively easy to fix/add (I believe), I’d like to request to add Thai font to the editor. I think DroidSans Thai (from Google) might be a good fit, as other Droid fonts are already in-use in the engine.

---

<div class="post-metadata">

**Author:** ![mr\_tawan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_tawan](https://forums.unrealengine.com/u/mr_tawan)\
**Post date:** [June 22, 2019, 2:44pm UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/2 "2019-06-22T14:44:01Z")

</div>

After a few months, I decided to dig a little more into the UE4’s code.

Basically just adding a few fonts file into `LegacySlateFontInfoCache.cpp` and the editor will display some Thai text. It’s not perfect yet, but I think it looks good enough.

The font I use for this screenshot is [Sarabun](https://cadsondemak.github.io/Sarabun/)from Cadsondemak. It’s a variant of TH-Sarabun PSK, released under OFL terms.

I am actually interested to send in a PR for this change, however since font files are not parts of the source file hosted on GitHub, I can’t just send one and hope that it will work correctly. So can someone suggest how and what should I do to get this one in?

---

<div class="post-metadata">

**Author:** ![Pagnawath](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pagnawath](https://forums.unrealengine.com/u/Pagnawath)\
**Post date:** [August 18, 2022, 8:06am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/3 "2022-08-18T08:06:17Z")

</div>

May you share what code you add into `LegacySlateFontInfoCache.cpp`?

---

<div class="post-metadata">

**Author:** ![mr\_tawan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_tawan](https://forums.unrealengine.com/u/mr_tawan)\
**Post date:** [February 16, 2023, 5:06pm UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/4 "2023-02-16T17:06:48Z")

</div>

It’s been quite a while. I haven’t checked back to the forum. Sorry about that.

Here’s what I added to `FLegacySlateFontInfoCache::GetDefaultFont()`

```cpp
        // Thai (editor-only)
		if (GIsEditor)
		{
			FCompositeSubFont& SubFont = MutableDefaultFont->SubTypefaces[MutableDefaultFont->SubTypefaces.AddDefaulted()];
			APPEND_RANGE(SubFont, Thai);
			
			APPEND_EDITOR_FONT(SubFont.Typeface, "Regular", "NotoSansThaiLooped-Regular.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "Italic", "NotoSansThaiLooped-Regular.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "Bold", "NotoSansThaiLooped-Bold.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "BoldItalic", "NotoSansThaiLooped-Bold.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "BoldCondensed", "NotoSansThaiLooped-CondensedBold.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "BoldCondensedItalic", "NotoSansThaiLooped-CondensedBold.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "Black", "NotoSansThaiLooped-Black.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "BlackItalic", "NotoSansThaiLooped-Black.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "Light", "NotoSansThaiLooped-Light.otf", EFontHinting::Default);
			APPEND_EDITOR_FONT(SubFont.Typeface, "VeryLight", "NotoSansThaiLooped-ExtraLight.otf", EFontHinting::Default);
			//*/
		}

```

However, it also need font files as well. Right now I’m using `NotoSansThaiLooped` from Google instead of Sarabun. This should be in-line with the rest of the font used by the editor (Japanese’s GenEi is a modified version of NotoSansJapanese, if I’m not mistaken, for example.).

Oh and the location of the font files is either `Engine\Content\Editor\Slate\Fonts` or `Engine\Content\Slate\Fonts` (I’m using the first one, haven’t got into why there are two separated font directories).

---

<div class="post-metadata">

**Author:** ![mr\_tawan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_tawan](https://forums.unrealengine.com/u/mr_tawan)\
**Post date:** [February 16, 2023, 5:55pm UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/5 "2023-02-16T17:55:11Z")

</div>

An update to the situation. As of UE 5.1, there’s a Thai font file bundled with the engine (`NotoSansThai.ttf`). However, there’s no reference to this font file at all in the engine source code (or at least as far as I can tell), so you will still get a [ท] tofu inside the editor when you type something in Thai in text control or anything.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/7/427380feadc8fc51102975ef2fdfc0922cf1d9a8.png)

So it’s safe to say we are a step closer but not there yet.

Now, with the simple code changes I made on the reply above, I can make it display Thai text (almost) properly. Given that I have the font file placed in the right place.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/5/315512622c666e368b947be0a74111fc10898391.png)

So I’d like to propose to add support for Thai text by adding Thai fonts (and the supporting code) to the UE editor.

\*\* Choice of font \*\*

I’m proposing to use “NotoSansThai **Looped** ” font, instead of “NotoSansThai”. While the name is very similar, their design are quite different. The main reason why I’d go with NotoSansThaiLooped is it has “loops”. NotoSansThai does not have loops, instead it has slant suggesting that there’s loop there.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/e/51e82865ed1cf79e7b3ce1459d30c229129b4e64.png)

Comparing to the non-looped version, the loop helps with legibility of the text, especially on the super small size text (like in UE’s editor). In fact, this is how the proper Thai character should looks like, not the non-looped version. I don’t know why the designer of the NotoSansThai decided not to have loops in the font.

These two fonts are part of the Google’s Noto project and there are fonts from the project that are already in-use by UE so I think it should be fine, licensing-vise.

I’d like to mention that I have talked with Chris Murphy (@HighlySpammable ) and Jack Condon a couple of times when they are here in Bangkok (the last time was the last Monday) about this. This is why I’m resurrecting this thread.

Jack did suggest that the UI font can be changed, but I can’t find where so … if anyone has an idea please let me know.

---

<div class="post-metadata">

**Author:** ![Bandicoot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bandicoot/32/619906_2.png) [@Bandicoot](https://forums.unrealengine.com/u/Bandicoot)\
**Post date:** [February 16, 2023, 7:30pm UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/6 "2023-02-16T19:30:30Z")

</div>

I prefer a loop version because it’s easy to read.

and please add to the game engine, I think we didn’t ask to much just put it in the Engine. if you want to do a marketing in SEA you have to understand we all have our own language and if you do that, it’s mean you can see us

We didn’t ask too much like making a Thai-Documentation.

---

<div class="post-metadata">

**Author:** ![prw\_champ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@prw\_champ](https://forums.unrealengine.com/u/prw_champ)\
**Post date:** [February 17, 2023, 9:15am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/7 "2023-02-17T09:15:18Z")

</div>

I agree with the idea of being able to change the font.

In fact, the engine itself should provide a way for developers to customize this part of the engine.

In my opinion, It could be one of doable solution If we can add the font we want in DefaultEngine.ini

My quick idea is something like this

```auto
// Additional Fonts
{
	if (GConfig != nullptr)
	{
		TArray<FString> FontPaths;
		if(
			GConfig->GetArray(
				TEXT("FLegacySlateFontInfoCache"), 
				TEXT("ThaiFonts"), 
				FontPaths, 
				GEngineIni))
		{
			FCompositeSubFont& SubFont = MutableDefaultFont->SubTypefaces[MutableDefaultFont->SubTypefaces.AddDefaulted()];
			APPEND_RANGE(SubFont, Thai);
			for(const FString& FontPath : FontPaths)
			{
				SubFont.Typeface.AppendFont(
					TEXT("Regular"),
					FPaths::EngineContentDir() / TEXT("Editor") / TEXT("Slate") / TEXT("Fonts") / FontPath,
					EFontHinting::Default, EFontLoadingPolicy::LazyLoad);
			}
		}
	}
}

```

We can create Struct to support more data instead of String, such as being able to define the language.  
In this case, we can support other languages as well.

---

<div class="post-metadata">

**Author:** ![mr\_tawan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mr\_tawan](https://forums.unrealengine.com/u/mr_tawan)\
**Post date:** [February 22, 2023, 8:06pm UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/8 "2023-02-22T20:06:43Z")

</div>

I agree that the engine should allow users to change font. May be it should refer to system fonts instead of having to bundle font files with the engine or have to specify the font file path in the configuration.

However, … I think having Thai fonts in the engine’s editor is more urgent and wouldn’t take as much time. Having to replace the font file manually, or have to manually compile the engine is not really healthy for us Thai. I mean if Epic really into virtual production then having more language support on the UI would bring more people into the Unreal ecosystem.

It’s kinda silly, when one engine have Thai font render in the text field but it cannot properly display it, while another one is totally capable but it does not do that. Yes the Unity 3D’s situation is much worse than Unreal, but we shouldn’t discuss that here I think

---

<div class="post-metadata">

**Author:** ![project.gheist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@project.gheist](https://forums.unrealengine.com/u/project.gheist)\
**Post date:** [January 22, 2024, 1:01am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/9 "2024-01-22T01:01:39Z")

</div>

I created a PR to address this issue, see [link to Github](https://github.com/EpicGames/UnrealEngine/pull/11355)

---

<div class="post-metadata">

**Author:** ![Teella](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/teella/32/1037992_2.png) [@Teella](https://forums.unrealengine.com/u/Teella)\
**Post date:** [July 19, 2025, 12:02am UTC](https://forums.unrealengine.com/t/support-for-thai-text-in-editor/220295/10 "2025-07-19T00:02:37Z")

</div>

Actually there is an easier way which requires no engine changes and easy to do with any version of the engine.

In Engine/Content/Slate/Fonts

You’ll find:  
DroidSansFallback.ttf (3.9 meg)  
NotoSansThai-Regular.ttf

If you download Font Forge you can open the DroidSansFallback.ttf and open the NotoSansThai-Regular.ttf and merge them. But before you do so you must resize the NotoSansThai-Regular.ttf like here:

Go to Element → Font Info

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/3/8d36fa49ed8ac034d819fb2b44cdf514d37df129.png)

do the same for both Fonts.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/5/705b0f79d558c4d6fdbd219525fc45bfad37d396.png)

Then you need to set the NotoSansThai-Regular.ttf as close to the DroidSansFallback.ttf

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/c/54c1880200a6c991853af73032012008ffd6f60f.png)

then click OK on the NotoSansThai-Regular.ttf and cancel on DroidSansFallback.ttf.

Now I DroidSansFallback.ttf go to Element → Merge Font .. answer Yes on the next question.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/c/9cccb9c0498fea4662f322e13ec125c6f9e26ba3.png)

After that you can now generate the font. File → Generate Font and choose TTF

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/9/4191bcfd3b2fff683fbc79c7ee6d666f6465be84.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/c/5fc4340429b0229faf00af29f36c3def6662456d.png)

And now you can replace the DroidSansFallback.ttf in your Engine/Content/Slate/Fonts folder and you will have Thai in the Editor and at Runtime.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/8/1a891915d3a56444ec7b2c784295a88a658c13f4.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/c/d9c83e1ab83baaec9160590702f1366b5874fc4b.jpeg)

I’ve also uploaded to my onedrive if anyone wants.

> **[DroidSansFallback.ttf](https://drive.google.com/file/d/1XNSEFIlMaJbdSO0ZD52OxeS3fR9J3KXM/view)**
>
> Google Drive file.
