Page MenuHomeFeedback Tracker

Japanese gets improper line break when a text is shown in a multi-line GUI element
New, NormalPublic

Description

Japanese language (long) texts get some improper line break when some half-width spaces (“ ”) are used in it.


I assume this is happening because RV engine considers the space as the sign of “safe to line break now because it is the end of a word” but Japanese doesn't use spaces between words and the text should line break at the end of the textbox no matter if there's a space or not.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Visual-GUI
Steps To Reproduce
  1. Launch Arma 3 in Japanese language
  2. Check some longer texts like Field Manual entries
  3. Observe the weird line breaks
Additional Information

Chinese got the same issue since it doesn't put spaces between words.
A full-width space (“ ”) doesn't have the issue.

Event Timeline

POLPOX created this task.Mar 7 2021, 12:18 PM
POLPOX added a comment.Mar 7 2021, 1:32 PM

I found out that hair space (U+200A) doesn't have this issue and have the same width with regular space, so possible to use to do a workaround.

dedmen added a subscriber: dedmen.EditedMar 7 2021, 3:43 PM

We don't have our own whitespace detection code.
https://en.cppreference.com/w/cpp/string/wide/iswspace

Half-Width space is U+FF00 is not considered a whitespace character
Thin space is U+2009 is a whitespace character

I don't know which specific character you are talking about in the initial ticket.

I was talked about U+0020, which is the character that will be written when we press the space bar on a keyboard.

...Am I right? Not really good with those Unicode things.