hey <@U0307M1CF4L>, there isn’t built-in support f...
# doodle
n
hey @ayodele, there isn’t built-in support for this. have you tried subclassing
Label
to add this functionality?
a
That's what we decided to do incase. Thanks.
I noticed a behavior with the new
lineSpacing
. 1. The calculated height from TextMetrics is wrong. 2. If there's a letterSpacing above 1f the specified size is ignored. Is that the intended behavior??
n
do you mean
lineSpacing
or
letterSpacing
? i assume you mean a
lineSpacing
>
1f
.
a
lineSpacing actually
n
hmm. should work with values greater then 1f. sounds like a bug. does text with this
lineSpacing
render properly though? i’ll try to repro when back in town early next week.
a
So lineSpacing renders properly no matter the value. The issue is if you set your label size height to like 50, and have a large text with a lineSpacing greater than 1f. When rendering, the defined height of 50 is ignored, the calculated height from applying lineSpacing is used.
n
even if you tell the
Label
to not fit its height: set
fitText
to a set without
Dimension.Height
?
a
Ah. That does it.
Quick question. fitText works without specifying size??
Like Views won't render if they don't have a size
n
it defaults to fitting both width and height. since that’s likely what you’d want for a Label.
a
Noted.
What about
textMetrics.size
? It returns the same height for 1f and > 1f
n
that sounds like a bug. are you specifying a width? it assumes a single line of text if no width is provided.
a
Yea, I'm specifying a width.
n
k. i’ll investigate early next week.
and the width is narrower than the text? to ensure it will wrap?
a
Yes. I tested with a large Lorem ipsum
n
Confirmed this is a bug. Will be fixed in the next release.