In centered h1
elements, if the text falls on multiple lines, line breaks make the text look like this:
This is a header that takes
Late to this party, but here's my approach. I get the initial element height (any elements with the class balance_lines, in the code below), then incrementally shrink the width of the element. Once the height of the element changes, I've gone too far. The step before that should have lovely roughly-equal line lengths