maximegmd / CyberEngineTweaks

Cyberpunk 2077 tweaks, hacks and scripting framework
MIT License
4.48k stars 285 forks source link

Chinese characters can not be properly shown #936

Closed Ptilopsis01 closed 2 weeks ago

Ptilopsis01 commented 6 months ago

README

Github is NOT here for support and general questions, it's designed for developers to discuss development and code. If your issue is unrelated to anything technical, do not make an issue, you will be blocked and your issue closed without an answer.

Bug

Operating system: win11 Game version: 2.12 CET version: 1.31.3 GPU: rtx3060m

Description

image You can see many "?" in this picture, which are all common Chinese characters that can not be shown correctly.

Expected behaviour

Show Chinese characters correctly

Reproduction

Download and install a mod using CET with Chinese characters.

maximegmd commented 6 months ago

Could you give us example characters that we can use to test and reproduce? None of us know Chinese so that would help us a ton :)

Ptilopsis01 commented 6 months ago

Could you give us example characters that we can use to test and reproduce? None of us know Chinese so that would help us a ton :)

The characters missing in this picture are “狙” “瞄” “刹”. I doubt it's the problem of the used font

WSSDude commented 5 months ago

Yeah, default ImGui glyph ranges are incomplete (and hog a lot of memory unnecessarily).

We had #840 previously merged, but reverted it due to issues with ImGui, specifically we are waitting for this PR to push it forward https://github.com/ocornut/imgui/pull/3761

I would rather not start extending the ranges manually, the PR above includes glyph ranges builder which should be resolving glyphs as they appear, being more optimal and universal.

TL;DR Fonts are definitely not an issue, current fixed glyph ranges are as they are incomplete and will stay that way for a bit I have a feel. 😞

Nats-ji commented 2 months ago

编辑cet安装目录里面的configs.jsonlanguage那一项的内容改成ChineseFull

Ptilopsis01 commented 2 months ago

编辑cet安装目录里面的configs.jsonlanguage那一项的内容改成ChineseFull

是config.json吗?改了之后好像还是一样的现象,还是有很多字符是显示的?

heheheaa commented 2 weeks ago

编辑cet安装目录里面的configs.jsonlanguage那一项的内容改成ChineseFull

是config.json吗?修改之后看起来还是一样的现象,还是有很多字符显示的?

因为你没设置字体 "font": { "base_size": 18.0, "language": "ChineseFull", "oversample_horizontal": 3, "oversample_vertical": 1, "path": "C:/Windows/Fonts/msyh.ttc"

Ptilopsis01 commented 2 weeks ago

感谢,确实可以了