Skip to content

Kanji/Hanzi characters use the same font in editor, disregarding localization #96838

Closed
@chocola-mint

Description

@chocola-mint

Tested versions

  • Reproducible in: 4.3 stable
  • Note that in 3.5.2 stable the editor always uses Droid Sans Japanese (which looks correct in Japanese but would look weird in Chinese instead)

System information

Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 31.0.15.5268) - 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz (12 Threads)

Issue description

When the editor language is set to Japanese, in the editor interface (right) the Japanese Kanji uses the Droid Sans Fallback font (which uses the Simplified Chinese variation), whereas the default ingame (left) font uses the Droid Sans Japanese font.
image

The core issue here is that Kanji/Hanzi share the same unicode code points, so if we were to address this issue, we need to use different fonts for these code points.

Ideally, the editor should be able to override the default fonts based on the current editor language, as part of the editor localization system.

See also: https://heistak.github.io/your-code-displays-japanese-wrong/

Steps to reproduce

  1. Open any Godot project.
  2. Go to Editor Settings, enable Localize Settings, and select ja as the Editor Language. Restart the editor when prompted.
  3. Select any node whose inspector contains a Text Edit node. (For example: A Label node)
  4. Copy and paste the following characters into the Text Edit: 刃直.

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions