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

Unicode character support required #6

Open
SuikaXhq opened this issue Apr 17, 2023 · 2 comments
Open

Unicode character support required #6

SuikaXhq opened this issue Apr 17, 2023 · 2 comments
Assignees

Comments

@SuikaXhq
Copy link

Describe the bug
When unicode characters (Chinese, Japanese, Korean, etc.) appear in the replay file (commonly in chat), the original font warhelios_bold.ttf just gives blank boxes as output due to lack of characters.

To reproduce
Steps to reproduce the behavior:

  1. Play WOWS and type any undefined characters (e.g., CJK characters) in chat.
  2. Generate replay mp4 using renderer.

Expected behavior
The characters are rendered as they should be.

Possible solutions

  1. Place any Unicode font (I tried Arial Unicode MS Font) in the src/renderer/resources folder.
  2. Edit src/renderer/layers/chat.py, replace L25 by filename="Arial Unicode MS Font.ttf", size=12 (just to change the font used)
  3. Reinstall the minimap_renderer package
  4. Regenerate the replays with blank box outputs. Now the characters are normal.

This solution is quite simple but the fonts in chat are not consistent with other fonts now. Is there any possible solutions to use different fonts for those undefined characters?

@padtrack padtrack self-assigned this May 11, 2023
@padtrack
Copy link
Member

I'll make a custom font that merges the different Warhelios fonts Wargaming uses.

This was referenced Oct 3, 2023
@HenryQuan
Copy link
Contributor

I have tested the Source_Han_Sans_CN_Bold_WH font from the game. It renders exactly the same as in the game. It also has the largest size (11MB). Not sure if this can cover up Japanese or potentially Korean also.

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

3 participants