linebender/parley

Weird layout when wrapping a long word

Opened this issue · 3 comments

The text is "ABCD" * 5
demo
Some characters advance too far and not visible within the width of layout.
(code)
Is it a bug or a corner case not to be considered?

dfrg commented

This looks like a bug. There are only two reasonable behaviors here: 1) render the whole “word” on one line and clip, or 2) wrap at a cluster boundary. This does neither.

Thanks for reporting.

dfrg commented

In addition, this behavior should probably be configurable either as a style property or for the whole layout.

There are Unicode codepoints which may also affect the expected behavior, when this is implemented properly (particularly U+2060 WORD JOINER [including ZWNBSP], and maybe U+00AD SOFT HYPHEN).