Implement the smart line wrapping styles (WrapStyle 0 and 3).
Per spec, wrap style 0 tries the make the lines equal length, but ensures lines are never longer than the line above it. Wrap style 3 does the same, but shorter lines are on top. Note that libass seems to treat style 3 as if it were style 0, and uses style 1 if the line is too long (though I don't know what the limit is).
It may be possible to implement this using balance-text. Though balance-text only makes the lines similar length; it doesn't ensure lower lines are shorter.
Implement the smart line wrapping styles (WrapStyle 0 and 3).
Per spec, wrap style 0 tries the make the lines equal length, but ensures lines are never longer than the line above it. Wrap style 3 does the same, but shorter lines are on top. Note that libass seems to treat style 3 as if it were style 0, and uses style 1 if the line is too long (though I don't know what the limit is).
It may be possible to implement this using balance-text. Though balance-text only makes the lines similar length; it doesn't ensure lower lines are shorter.