Wrap mode NEWLINES was skipped all the time because of this if condition:
// Short circuit all wrap calculations if wrap mode is none
if (textConfig->wrapMode == CLAY_TEXT_WRAP_NONE || (containerElement->dimensions.width == textElementData->preferredDimensions.width)) {
The second part of the if was always true for text with wrapping mode NEWLINES. I added another condition that skips this width check in the case of NEWLINES.
Wrap mode
NEWLINES
was skipped all the time because of this if condition:The second part of the if was always true for text with wrapping mode
NEWLINES
. I added another condition that skips this width check in the case ofNEWLINES
.Automatic word wrapping (works fine):
Manual line breaks (
\n
) before the fix:Manual line breaks (
\n
) after the fix: