Skip to content

Label option horizontal alignment fill justification result is different between debug and build #108864

@SirakabaBiome

Description

@SirakabaBiome

Tested versions

Ver 4.4.1-stable

System information

Godot v4.4.1.stable - Windows 10 (build 19045) - Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 32.0.15.6094) - AMD Ryzen 5 5600X 6-Core Processor (12 threads)

Issue description

This text was originally written in Japanese and translated by machine. Please understand any awkward expressions may be due to this.

When running in Debug mode, setting a Label's horizontal_alignment to Fill causes the text to be spaced out to fill the label's width, as expected.
However, when running a Built version, this behavior is not consistent for Japanese text: it behaves more like Left alignment, and the text is not stretched to fill the width.
This is particularly noticeable with Japanese (full-width) characters. The Fill mode seems to separate every character individually, which may already be an unexpected behavior, as Fill is generally intended to justify text based on word boundaries.
It appears that the justification behavior is different between Debug and Build modes.

Screenshot
Image
In the attached screenshot:
The left window shows the application running in Debug mode
The right window shows the same application after being Built
You can see that the continuous string aaaあいうえお is not justified with Fill alignment in the built version.

Steps to reproduce

  1. Set a Label node's horizontal_alignment property to Fill
  2. Input a string with Japanese (full-width) characters
  3. Compare the rendering in Debug vs Built mode

Minimal reproduction project (MRP)

texttest.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions