How do you handle localization in HUDs?

We will have multiple languages, and several of them will definitely require more room. We are going to be using custom fonts, though, so even if I plan the UI to adjust its size dependent on the text size, how do we support multiple languages in custom fonts, or is there a better way of dealing with this situation?

Hi Bridget,

What are you using to make your HUD? Is it Slate (C++ based), UMG, or Canvas?

If you’re using Slate/UMG, then the localisation support for fonts is currently very limited. At present, we only have a single culture specific fallback font that gets used for any glyphs that your main font can’t draw.

If you’re using Canvas, then UFont assets can generate additional font atlas pages for additional languages, however it means that you have to pre-generate any glyphs you may want to use, which is rather wasteful.

For 4.6 we’ve been working on adding support for composite fonts and font families (I’m actually about to submit that change today). This will greatly improve the localisation support for fonts, by allowing you to define which fonts should be used for a specific set of characters, and what style that font should be (eg, Bold, Italic, etc).

Thanks,
Jamie.

Hello,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.

Thanks!

We are using UMG. So the artist will need to be responsible for gathering font families for any languages we are supporting?

Yeah.

It might be that you find a single TTF or OTF font file that supports all of your required glyphs (some do), but you more typically find that a font file will be designed for a certain language (or set of languages).

You can using something like the Character Map on Windows to see which glyphs are supported by your fonts.

Let me review it and be sure it is sanitized. I will do so later today and then respond to this comment so you will know it’s ok to use.

I think this should be ok to use for the public community. Thanks!