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()
// 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).