jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
508 stars 42 forks source link

How to change line height? #17

Closed dessalines closed 1 year ago

dessalines commented 2 years ago

I've tried overriding the style, and that doesn't seem to work. Any idea how to set the line height?

It seems to be ignoring many params from style = TextStyle(...

dessalines commented 1 year ago

bump

dessalines commented 1 year ago

I'm not exactly sure why, but that didn't fix both the font size, and the line height issue. I'd like to do:

MarkdownText(
  markdown = ...
  style = MaterialTheme.typography.body1
  ...

But that style's font size and line spacing gets ignored, the font being reaallly tiny.

So I have to use fontSize = ..., and then line height gets ignored.

Maybe there's a forced wrong conversion of units going on somewhere.