htmltextgodotgdscript

godot web export does not support text in other languages


I am developing a game with the Godot game engine for the web platform. The problem is that when I want to output for the web, only the English text is displayed correctly and the rest of the language is not displayed correctly. The example is in the picture:

enter image description here

While there is no such problem for other outputs like Android or Windows. Does anyone know where the problem comes from?


Solution

  • If your web export isn't displaying non-English characters properly, I think it's probably because the right fonts aren't being used.

    1. Use a Unicode Font: Import a font like Noto Sans or Arial Unicode and set it in Project Settings > GUI > Theme > Default Font.
    2. Use DynamicFont: Create a DynamicFont resource, load a TTF/OTF font, and apply it to UI elements.
    3. Ensure Fonts Are Included in Export: Check export_presets.cfg to make sure the font is bundled.
    4. Test Encoding: Print different language characters in the console to see if they are processed correctly.