The optimization problem solved by the optimal-fit algorithm is fundamentally an optimization problem where we seek to minimize a penalty cost. It is therefore not sensible to allow negative penalties since all penalties are there to discourage certain features:
nline_penalty discourages breaks with more lines than necessary,
overflow_penalty discourages lines longer than the line width,
short_last_line_penalty discourages short last lines,
hyphen_penalty discourages hyphenation
Making this change surfaces the overflow bug behind #247 and #416. This will be fixed next via #421 and this commit can be seen as a way of simplifying that PR.
The optimization problem solved by the optimal-fit algorithm is fundamentally an optimization problem where we seek to minimize a penalty cost. It is therefore not sensible to allow negative penalties since all penalties are there to discourage certain features:
nline_penalty
discourages breaks with more lines than necessary,overflow_penalty
discourages lines longer than the line width,short_last_line_penalty
discourages short last lines,hyphen_penalty
discourages hyphenationMaking this change surfaces the overflow bug behind #247 and #416. This will be fixed next via #421 and this commit can be seen as a way of simplifying that PR.