I am learning iOS textkit from official tutorials here: https://developer.apple.com/documentation/uikit/textkit/display_text_with_a_custom_layout
After running and testing the code for a while, I found an incorrect ellipse beahavior:
The code uses one-length flexible space control-character following the ellipse character to push the rest of the chars to the next line by setting its width equal to the rest of the line width.
However, as shown above, it failed to do so. I think that's because the line break policy determines to squeeze a bit of room for the following period even there's no room, which is a correct policy for common case. But it's clearly not what we want in this case.
So, the problem is how to correct it.