mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Previously libtxt was applying right justification during line layout based on the line width returned by the Minikin line breaker. However, this width does not include the width of leading or trailing whitespace. So in a right justified line the starting offset of the first glyph would not account for the advance of the leading whitespace, resulting in text being clipped. This PR applies line justification after the glyphs are laid out and the full advance of the text is known. Fixes https://github.com/flutter/flutter/issues/16333