Prior to this commit we overallocated the s32 buffer. The buffer was
unnecessarily padded by zeros, and the line stating this, wasn't
actually dropping the null terminator.
Applies the previously missed line spacing value of the TextEditor.
The changes in JustifiedText fix calculating the vertical position of
the first line for the case where ShapedTextOptions has the following
settings:
isBaselineAtZero() == false,
getHeight().has_value() == false
getLeading() > 1.0f
This case however is only triggered by the TextEditor, as with all
functions in GlyphArrangement at least one setting is different.
This change also fixes bad access that could happen with \r\n
line terminators. An incorrectly sized buffer meant that \n was
clobbered by the null terminator.
With this change you can use makeIntersectingRangedValues() not just for
RangedValues objects, but any object that has a begin() and end()
function returning a RangedValuesIterator.
Previously using the FontForRange type was motivated by hiding the
RangedValues type in case we wanted to expose the ShapedText API. This
introduced unnecessary conversions between FontForRange and
RangedValues<Font>.
Since the original function template has been exposed, we can now use it
directly. Also ShapedText::Detail has been removed, because it wouldn't
work across module boundaries.