WebGL and Chinese (Simplified) zh-CN issue

More
7 years 9 months ago #2076 by paramburu
Hi,
I am having an issue with the chinese language under WebGL.

I have unity 5.5.0f3 and upgraded to the latest plugin beta (2.6.10 b5) before posting this.

On the editor I can see the translations properly but on WebGL the chinese characters don't show up. Only regular characters except for a few cases. For example, instead of showing me:

使用水冷喷枪,将高速氧气流注入溶池。利用收敛/扩张喷嘴生成超音速氧气流,这种氧气流提供清晰、受控的贯穿性能,可有效形成所需的炼钢反应,以及最大限度延长喷枪寿命(通常200至400次加热)。

It shows:

/200400


The strange thing is there isn't any "/" in the string and that if it prints regular characters like 200 and 400, why does not print "(" and ")" for example.

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #2077 by Frank
Hi,
The issue you are seeing is that Unity doesn't use the same font in desktop/mobile and WebGL.
The desktop version has more characters. When in WebGL, all the Chinese glyphs are ignored, but the encoding of them makes unity skip several of the other characters as well.

The way to make this work in WebGL is to supply your own font.
For instance, I downloaded the ArialUnicode font, and set it in unity, instead of using the default ARIAL font.

Here is an screenshot of it running in WebGL:



and here is the inspector, referencing the Unicode version of Arial (you could use any other free font, as far as it has the needed glyphs)



Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Attachments:
The following user(s) said Thank You: paramburu

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #2081 by paramburu
Thanks Frank,
I am not using the default font but I understand it might not have the chinese characters but in the editor it might get filled by another system font.

I haven't been able to download that specific font but I will try to find another one with chinese characters and maybe try to exchange the font depending on the language. I think that is possible, right?

I'll let you know how it goes.

Thanks!

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #2082 by paramburu
Seems to be working fine. Thanks again!

Please Log in or Create an account to join the conversation.

Time to create page: 0.325 seconds
Template by JoomlaShine