How does the editor wrap lines

If the text of the editor exceeds the maximum position of the constraint, how to realize automatic line break

Assigned to
11 months ago
5 months ago
No labels applied.

~xuhui 11 months ago

~eliasnaur 11 months ago

Please post an example program and/or screenshot that demonstrates your issue.

~xuhui 11 months ago

~eliasnaur 11 months ago

Can you post the example inline, or link to screenshots off-site? This TODO tracker unfortunately doesn't support attachments.

~xuhui 11 months ago

Like component material.Editor when it's text content exceeds the maximum limit of the current line, how to make it automatically wrap. The text content in picture 1 has exceeded the current line width, I want it to become like picture 2.

~whereswaldon 11 months ago

This is a missing text shaper capability. Gio's underlying text shaping library only splits on UAX#14 line breaking candidates, which means (for latin text) that it only splits between words or punctuation. The string of characters you use in your example is one "word" from UAX#14's perspective, so we can't perform a line break within it.

To fix this, the shaper needs to implement an optional UAX#29-based grapheme cluster breaking strategy that allows us to split any "word" on a grapheme cluster boundary. I haven't yet gotten around to adding that to the shaper.

~eliasnaur REPORTED FIXED 5 months ago

Chris Waldon referenced this ticket in commit c6e4eec.

Register here or Log in to comment, or comment via email.