Libass does the same, and I think it's a good idea. But their method is IMO overly complicated. Or else I'm over-simplifying things. But this seems to work very well.
531289a freetype: make paragraph lines equal in width, more or less
modules/text_renderer/text_layout.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
Upstream: git.videolan.org