Comment 2 for bug 1801208

Revision history for this message
Arty (artydent) wrote :

Committed a small fix.

Aside from fixing types to avoid overflow in the anchor calculation, I also set the anchor to 0 when it would become negative, otherwise the longest unbreakable string would be properly aligned but all the short strings would be off (even outside of the visible area if the long string was long enough).

So now the short lines are aligned as they should, but overlong unbreakable lines are automatically aligned left and truncated right. I think that's good enough, it's truncated somewhere anyway.

(To also align the long lines properly, I briefly considered adding an additional sweep in the font renderer to re-adjust the position of short lines when overlong lines were present, but I didn't feel comfortable enough to mess around in the renderer, possibly breaking other stuff in the process.)