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

Can't render non-English characters correctly on Windows #39

Open
wadecoding opened this issue Apr 9, 2021 · 2 comments
Open

Can't render non-English characters correctly on Windows #39

wadecoding opened this issue Apr 9, 2021 · 2 comments

Comments

@wadecoding
Copy link

Describe the bug
As the title goes, when player's ID includes non-English characters like Chinese, the position of Chinese character is replaced with a tiny square.

To Reproduce
Open any demo with player's ID in Chinese.

Expected behavior
Chinese character to be rendered correctly.

Screenshots
screen

Desktop (please complete the following information):

  • OS: Windows 10
@Linus4
Copy link
Owner

Linus4 commented Apr 9, 2021

Hi @wadecoding !
It seems like the font that we use (DejaVuSans.ttf) contains symbols for a lot of scripts, but not for all. If there's a tiny square instead of a symbol it means that the font file is missing that particular symbol.
Google develops a font family called Noto which aims to contain symbols for all scripts.

As a workaround you can go to your install directory and rename DejaVuSans.ttf to something else in order to make a backup. Then download a font from the link above. Extract the .ttf file you want, move it to your install directory and rename it to DejaVuSans.ttf.

This is still somewhat problematic, though, as Noto Sans or Noto Mono, for example, do not contain Japanese or Korean symbols (but symbols for about 500 other languages). Symbols for those languages are contained in separate font files that are also listed on that page. Also, I don't really know which Chinese dialects are supported.

Language support in csgoverview might be improved by using Noto Mono when rendering player names. Still, that leaves out a few important scripts, and we're also currently relying on DejaVuSans for a few special symbols that are not contained in Noto.

@wadecoding
Copy link
Author

HI, @Linus4!
It works with your instruction!

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

No branches or pull requests

2 participants