diff --git a/text/linebreak.go b/text/linebreak.go index 697b351..c523929 100644 --- a/text/linebreak.go +++ b/text/linebreak.go @@ -293,12 +293,12 @@ func (lb *linebreaker) computeAdjustmentRatio(b int, active *Breakpoint) float64 } ratio := 0.0 if L < lb.width { - //if lb.Y-active.Y == 0.0 { - // // unstretchable line, act as if we have a very small stretchable space. - // // this helps to distinguish between between smaller and longer lines if both would - // // need to stretched beyond the tolerance - // return Infinity * (1.0 + (lb.width-L)/lb.width) - //} + if lb.Y-active.Y == 0.0 { + // unstretchable line, act as if we have a very small stretchable space. + // this helps to distinguish between between smaller and longer lines if both would + // need to stretched beyond the tolerance + return Infinity * (1.0 + (lb.width-L)/lb.width) + } ratio = (lb.width - L) / (lb.Y - active.Y) } else if lb.width < L { ratio = (lb.width - L) / (lb.Z - active.Z)