How to enable FreeType?

Hello I want to enable FreeType so I can use right to left language such as Arabic and Hebrew in Unreal Editor how is this possible?

I got some good news and some bad news.

The good news is that FreeType is enabled by default for our custom UI solution known as Slate. It’s the same UI system we use to build the Editor.

The bad news is that we don’t have a font shaping library integrated so its my understanding that you won’t be able to render Arabic text correctly. We also don’t have any built in support for localized layouts, for dynamically switching between right-left and left-right readers. Something else to be aware of is that our string class is only compatible with the basic multilingual unicode plane, though it appears Arabic and Hebrew are within that range.

We do have plans to implement a font shaping library, in fact one is distributed with our source on GitHub, though it is not integrated. The plan is to integrate ICU’s font shaping library. We also have long-term plans for making our string class fully unicode compatible, but that will be far in the future, though we’ll be consistently taking steps towards it.

Justin
Epic Games

I managed to render Arabic correctly with manual glyph substitution I tried to use ICU ArabicShaping.cpp also you need to change TTF font because Arabic Unicode range is not included in Slate falls back to LastResort.TFF font

Is there anyway to include language “ar” using internationalization system? How can I edit .locres files? I changed LOCTEXT in text literal to get some results but this is inefficient.

That’s good to know.

The TTF we use by default doesn’t include languages which aren’t based on the roman character set. We have different fonts that the engine attempts to fallback on when encountering unknown characters. Currently we only have fonts for Japanese, Korean, and Chinese.

The Arabic language codes are supported by ICU. All you have to do is set your engine to that specific code. It will accept language and language-region codes.

.locres files are binary and can’t be edited by hand, instead you can build them using a commandlet which effectively combines the necessary parts of the .manifest and .archive files.

I can provide more details if you can tell me what your end goal is. Are you trying to create a Arabic version of the editor? or create a game in Arabic?

I am trying to create an Arabic version of the editor, is there any way to contact you faster than this like Skype?

Ok. If you go to your editor settings you can change your language to be Arabic specific. You’ll find it under the Appearance section in your build, I believe.

Next you need to go to UE4\Engine\Config\Localization and open up the Editor.ini and Engine.ini. In there you’ll find a CulturesToGenerate array, you should add Arabic to both of these.You should consider removing the other language so as to not corrupt your content and iterate faster.

Next you should run the editor with the following cmdline:

-run=GatherText -config="…/…/…/Engine/Config/Localization/Engine.ini"

and then

-run=GatherText -config="…/…/…/Engine/Config/Localization/Editor.ini"

This will create the Arabic archive files. You’ll find them under UE4\Engine\Content\Localization. You can then enter translations into your archive files and re-run the above cmdlines. They will create/update your locres.

Your editor will automatically load the Arabic locres if your editor language is set to Arabic.

Be aware that there is a bug in the Language/Region settings that makes the setting only apply to the currently open project. So the splash screen won’t appear in Arabic since that appears before the project is loaded. You can get around this by changing your OS language/region to Arabic.

This should get you well on your way.

Unfortunately, we don’t have much support for your current goal. Good luck! Let me know how it goes!

Yeah, actually if you could jump over on the community forums we can discuss in more detail. https://forums.unrealengine.com/forumdisplay.php?11-Work-in-Progress

I just made a thread.