XITRIX / Moonlight-Switch

Moonlight port for Nintendo Switch
779 stars 47 forks source link

Chinese simplified have rong display #63

Open momikiii opened 2 years ago

momikiii commented 2 years ago

Hi,XITRIX

I have some problem in your app

Chinese simplified have rong display , and I can't alter language to English, hope you can fix it , and add an options to change language

Thanks a lot!

XITRIX commented 2 years ago

What do you mean "wrong display"? I don't know Chinese and this language was added by community, so I cannot confirm is it ok or not. Anyway option to change inapp language is planning.

Alioth2000 commented 2 years ago

Some Chinese character are not displayed correctly, they are vacant. In my experience this is not a translation problem, this should be a lack of corresponding fonts image

momikiii commented 2 years ago

Some Chinese character are not displayed correctly, they are vacant. In my experience this is not a translation problem, this should be a lack of corresponding fonts image

This is what I mean , and I am trying to add Microsoft Yahei font in this project , but I can't execute "meson build" correctly when I finished adding font.

I'll be appreciate ,if you can check my another issue and provide some help.(●'◡'●)

18271211 commented 2 years ago

for my self, just copy en-us language file into hans to pass this bug...

zmk5566 commented 1 year ago

Some Chinese character are not displayed correctly, they are vacant. In my experience this is not a translation problem, this should be a lack of corresponding fonts image

This is what I mean , and I am trying to add Microsoft Yahei font in this project , but I can't execute "meson build" correctly when I finished adding font.

I'll be appreciate ,if you can check my another issue and provide some help.(●'◡'●)

Thing is, I am NOT even sure this is caused by font issue.

I have tested the font embeded in the ./resources/font folder, install the font on ubuntu and here is the font test result: screen-shot

So either:

  1. The font in the resource folder is not used atm , or
  2. some other kinda problem
zmk5566 commented 1 year ago

As a follow up, I suspect it might be an encoding issue. To be more specific, something to do with CJK issue that is why some of the characters are missing but some of them are able to display. The reference is here : https://en.wikipedia.org/wiki/CJK_characters I ll try to start a build myself to see how it goes.

CaiMiao commented 1 year ago

@XITRIX this is because you did not load chinese shared font in your codes.

i have written a solution of early stage of yoga borelis here but did not have time look into latest changes as i aready using legacy. you can integrate a similar solution but i would suggest you just copy most of my code.

CaiMiao commented 1 year ago

2022081002382700

I made a build to add shared font support. Moonlight-Switch.zip

Note: loading additional shared font consumes a few RAM, which may cause potential performance impact. if you are okay with that, just cherry-pick my commit with commenting line out from 43 to 50 (consume less RAM).

(这个build添加了中文字体支持,但是会额外占用部分内存,因此有可能出现性能问题。如果你在意可用内存,请放弃使用简体中文,直接全部改成日文汉字。下面上传的main.json是繁体中文转日文汉字。)

if you concern about those RAM, i will suggest delete the chinese translation, or use this malformed main.json (for tofus use Japanese Kanji instead) for both Hans and Hant. https://gist.github.com/CaiMiao/f38d274e4d413700374c6173065c65b9

CaiMiao commented 1 year ago

2022081002434500

no additional shared font but main.json edited build.

save some RAM.

Moonlight-Switch-zhKanji.zip