Skip to content

Rewrite process_item

Matthias Clasen requested to merge rewrite-line-breaking into main
This is not an entire rewrite, the basic approach
to fitting items is still the same. The main difference
here is that we shape and measure a possible breakpoint
before accepting it as candidate for breaking. This
is necessary to ensure that we have accurate width
information when making decisions about this
breakpoint - the width we are calculating based on
log widths is only an approximation (due to things
like clusters, hyphens, final spaces, etc).

To avoid excessive shaping, we only do this extra
work when we are close to the end of the line.

Merge request reports