Skip to content

Unicode character support required #6

@SuikaXhq

Description

@SuikaXhq

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions