Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Chinese characters were garbled #18474

Closed
5 tasks done
redomCL opened this issue Dec 4, 2023 · 7 comments
Closed
5 tasks done

The Chinese characters were garbled #18474

redomCL opened this issue Dec 4, 2023 · 7 comments

Comments

@redomCL
Copy link

redomCL commented Dec 4, 2023

Game or games this happens in

none

What area of the game / PPSSPP

QQ截图20231204220853

What should happen

in ubuntu 23.10 flatpak ppsspp,the Chinese characters were garbled

Logs

Platform

Linux / BSD

Mobile phone model or graphics card

GTX 1060

PPSSPP version affected

1.16.6

Last working version

ubuntu snap 1.12.3

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@hch12907
Copy link
Contributor

hch12907 commented Dec 12, 2023

What font is Ubuntu using for Chinese? (Ubuntu默认安装的中文字体是什么?)

image

PPSSPP looks for the following for Chinese/Japanese/Korean characters:

  • Source Han Sans
  • Noto Sans CJK

@hrydgard
Copy link
Owner

hrydgard commented Dec 12, 2023

Yeah, seems like we need to add more fonts to the list, or maybe somehow autodetect relevant fonts?

The list is in https://github.com/hrydgard/ppsspp/blob/master/Common/Render/Text/draw_text_sdl.cpp#L52

Or I guess it got built without fontconfig? see USE_SDL2_TTF_FONTCONFIG

@hrydgard
Copy link
Owner

In #18732 I'm adding "Droid Sans Fallback" to the list of fonts we try to load. This seems to be present on a very regular Ubuntu install, and can easily be installed as described in the PR if not.

@hrydgard hrydgard modified the milestones: v1.17.0, v1.18.0 Jan 19, 2024
@jiang131072
Copy link

I encountered a similar issue on Manjaro where the default Chinese font is set to Noto Sans CJK SC. However, it appears that a specific language specification is required, such as Noto Sans CJK SC.

To verify, I ran the command fc-list | rg "NotoSansCJK-Medium" and obtained the following results:

/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK KR,Noto Sans CJK KR Medium:style=Medium,Regular
/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK HK,Noto Sans CJK HK Medium:style=Medium,Regular
/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK SC,Noto Sans CJK SC Medium:style=Medium,Regular
/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK JP,Noto Sans CJK JP Medium:style=Medium,Regular
/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK TC,Noto Sans CJK TC Medium:style=Medium,Regular

@hrydgard
Copy link
Owner

Interesting. So, we should also influence the choice of which noto variant to prioritize depending on either the system locale, or the chosen language in PPSSPP. But I think we'll add them all to the list, just in a locale dependent order..

It seems the Noto fonts are fairly widespread in support, it's just that it seems we tried to load it using the name "Noto Sans CJK Medium" which is missing the language specifiers.

@hrydgard
Copy link
Owner

#18734 might improve it.

@hrydgard
Copy link
Owner

This should be fixed now, please re-open if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants