Skip to content

Issue about multiline text in Chinese #2851

@mimi99528

Description

@mimi99528

The text line break feature (multiline=True + width parameter) in Arcade is only effective for text separated by spaces

Words are separated by spaces and can wrap automatically ✅
No natural word boundary, cannot wrap automatically ❌
Best Solution: Use the zero-width space ZWSP (U+200B).
Then proceed with the normal drawing
arcade.Text(processed_text, ..., multiline=True, width=max_width)
ZWSP is not displayed but is recognized by Arcade as a line break point, perfectly resolving the Chinese line break issue.

Note: Both the arcade.Text object and the arcade.draw_text function have this limitation.

Suggestion For Fixing : For non letter characters, each character is counted as a word to group line breaks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions