korge icon indicating copy to clipboard operation
korge copied to clipboard

Feature request: Line height (multiplier) for Text

Open zhanghai opened this issue 3 years ago • 2 comments

Currently there is support for text spacing with Text, but the line height is also the one from font metrics. It would be nice if we can allow 1.5x or double spacing for the text.

EDIT: I realized since I have the custom TextRenderer, I can add the multiplier when caling newLine(). So even if this isn't released with 3.0.0 I won't be personally affected.

zhanghai avatar Jul 16 '22 04:07 zhanghai

So do you mean that Text should expose a property line lineHeight, or something else like exposing a property for a spacing multiplier? How would it work when using multiple fonts in the TextRenderer? Would it be for the main font?

soywiz avatar Jul 16 '22 08:07 soywiz

hmm - I never knew TextRenderer supported multiple fonts, so I don't have a good answer.

From what I know, Android TextView has android:lineHeight, whereas Jetpack Compose has a lineHeight property for ParagraphStyle.

zhanghai avatar Jul 16 '22 08:07 zhanghai