Jason Simmons dd83413e52 libtxt: post-process glyph positions in order to accurately right-justify text (flutter/engine#5093)
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
2018-04-26 09:42:38 -07:00
..