Multilingual Font Solution in Defold: Supporting Latin and CJK (Chinese, Japanese, Korean)

I recommand Language Specific HW OTFs Simplified Chinese (简体中文)

This font is free for commercial use.


I use defold-lang and the font file above as example.

Do not select “All Chars”. Add only the characters you need.

Thank you! @Insality the defold-lang is awesome.

2 Likes

But there is a problem: Chinese and Japanese text cannot wrap correctly.

However, this issue can be worked around by manually inserting ‘\n’ in json file.

Or you can try the solutions below, but I do not recommend them.

I found the best solution is manually inserting ‘\n’ in json file, especially when you use defold-lang extension. Otherwise, it will not only waste a lot of time but also make the code logic much more complicated.


I found the best solution is manually inserting ‘\n’ in json file, especially when you use defold-lang extension. Otherwise, it will not only waste a lot of time but also make the code logic much more complicated.

4 Likes

Hi!
Given the wrap issue you see, how come you are not using our font layout system? It has full layout support for Chinese etc.

1 Like

font layout system? Do you mean GUI text ?

Actually, I use GUI text in this example. But Chinese and Japanese text can’t wrap correctly, if I don’t insert ‘\n’. I put the text in a JSON file just to make multilingual translation and switching easier. In the end, it is still read from the JSON file and then set to the GUI text.

example: 可可可可可可可可

We added support for ”text shaping”, e.g RTL or Asian languages in 1.12.0:
”Added support for text shaping (by JCash)”

1 Like

Thanks!