When clicking in a TextEditor to position the caret, the caret would be
placed at the penultimate position when clicking at the end of a line
with trailing non-newline whitespaces.
Co-authored-by: Aga Janowicz <aga@roli.com>
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.
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.