osu icon indicating copy to clipboard operation
osu copied to clipboard

osu!lazer won't display CJK characters in China style.

Open SirnoChan opened this issue 4 years ago • 10 comments

Describe the bug: I tried apply Simplified Chinese (简体中文) l10n to new version osu!lazer, and my Windows 10 system is set up with China locale/region. After recent updates, my osu!lazer instance starts supporting i18n translations as well. But this brings up a problem which may be not a rare occasion in similar circumstances. osu!lazer doesn't display Chinese characters in Chinese style but in Japanese style. CJK Unified Ideographs have some characters of common unicode codes, but the writtings are different, and if software doesn't recognise users' locale and doesn't deal with them properly, users will see a writting style they are not fimilar to.

Take the below screenshot as an example. In the screenshot, the "置" in "设置" (settings) should be displayed as "置" in China locale style but it shows "置" is Japan locale style, and the "改" in "改变" (to change) should be displayed as "改" in China locale style but it shows "改" in Japan locale style. Screenshots or videos showing encountered issue: screenshot

osu!lazer version: 2021.707.0-lazer Logs: Not applicable.

SirnoChan avatar Jul 09 '21 10:07 SirnoChan

The string is from this localisation.

https://github.com/ppy/osu-resources/blob/2ba3c03018270c7f99fdbfa9d20775e326b3315d/osu.Game.Resources/Localisation/Settings.zh.resx#L61-L66

If you want to correct it, please contribute and change it in crowdin and the localisation will be updated frequenly from that.

gagahpangeran avatar Jul 09 '21 10:07 gagahpangeran

This is not a problem with the localisation. The unicode standard (namely the unified ideographs section, as stated in the OP), allows a single Unicode codepoint to be displayed in a different manner depending on the language in which the codepoint is being rendered.

@gagahpangeran I'd recommend checking out the relevant section of the unicode spec and looking at the 0x7F6E codepoint, which is one of the ones mentioned in the OP.

bdach avatar Jul 09 '21 10:07 bdach

Ah, I totally missed about that.

Thanks for the correction.

gagahpangeran avatar Jul 09 '21 10:07 gagahpangeran

Ref: https://github.com/ppy/osu/discussions/18522

Doing some search in repos and I'm sure this issue can be fixed at lazer side (osu and/or osu-resource), rather than osu-framework:

  • Allow user to select font that used in lazer from system.
  • Load and use Noto Sans SC/TC (only) when ui language is Chinese.

kj415j45 avatar Jun 02 '22 04:06 kj415j45

It will need support from osu!framework to clear the glyph/texture atlases.

smoogipoo avatar Jun 02 '22 04:06 smoogipoo

I'm 99% sure that isn't the solution we want, as it would display incorrect characters in metadata when the language of the metadata doesn't match the user's language. Maybe broken in a better way than it is now, but still an issue to consider.

As mentioned by @bdach this should be localised to usages rather than applied on a game-wide level. Maybe something which is added to LocalisedString.

peppy avatar Jun 02 '22 05:06 peppy

I'm 99% sure that isn't the solution we want, as it would display incorrect characters in metadata when the language of the metadata doesn't match the user's language. Maybe broken in a better way than it is now, but still an issue to consider.

Yes, but characters in metadata is quite a different problem. It should match the music's language. We may need to add a property so that these metadata can be rendered with right font. Or directly use language defined in mp3 or beatmapset. However, those strings used by UI should strictly render with user's locale/language settings. That's the main problem in this issue.


It will need support from osu!framework to clear the glyph/texture atlases.

Yes, load resources without any usage is a bad smell, but how much memory will these unused glyph/texture waste? Is it worth to write code to unload them?

kj415j45 avatar Jun 02 '22 06:06 kj415j45

Excuse me, is there any progress on this issue? Thanks a lot.

Wanye-7300 avatar Jun 03 '25 15:06 Wanye-7300

There's no progress. Considering stable never got this right, I wouldn't have high hopes on this being fixed anytime soon. It's not a simple one.

peppy avatar Jun 10 '25 07:06 peppy

Considering stable never got this right

Even though this is not 100% correct on stable either, I want to point out that stable deals with it way better:

  1. the UI display is correct. The 1st image below is in simplified Chinese, and the 2nd image is in Japanese. Note the character 置.

Image Image

  1. regarding the metadata, I think the stable logic is the following: a) if the field contains kanas, all characters in that field is rendered as the Japanese style; b) otherwise, characters with variants are rendered in the style of the UI language.

(the 置 in the image below are added by me, not in the original metadata) Image while this is not 100% correct, it does cover the majority of cases (if a song is in Japanese its title is more likely to contain kanas instead of being kanji only), and I doubt you can do significantly better for instrumental songs (unless you know its meaning i.e. niwashi=gardener, I don't think you can tell if 庭師 is Japanese or traditional Chinese because the writing of kanjis are same).

cihe13375 avatar Jun 13 '25 17:06 cihe13375

The font in osu! stable uses the system(Windows) font in default, as: Microsoft YaHei ( Chinese Simp. ) Microsoft JhengHei (Chinese Trad. ) Meiryo ( Japanese ) Gulim(?) ( Korean )

So, in osu stable, the font glyph is right in regular UI when user set their language correctly. Also in beatmap metadata.

In lazer, the CJK font has 4 variables : JP, KR, ZH-CN, ZH-TW.

Game will use the alphabet order to choose which variable shows in UI, so the default is JP variable.

This is an issue that SOO....many games also have in.

soloopooo avatar Aug 13 '25 05:08 soloopooo