libtxt: handle newlines during invocation of the minikin line breaker (#4237)
minikin::LineBreaker does not convert newline characters into line breaks in its output. Previously libtxt's version of LineBreaker container a patch that added a large width offset for a newline in order to force wrapping to the next line. This works if the offset exceeds the paragraph's width constraint. But if the paragraph is laid out with infinite width, then the text after the newline will continue on the current output line. This change separates the paragraph's text into newline delimited blocks and feeds each block separately to the minikin LineBreaker. Also, libtxt was breaking the input styled text runs at newline boundaries. This is no longer necessary.
Showing
想要评论请 注册 或 登录