halilozercan / compose-richtext

A collection of Compose libraries for advanced text formatting and alternative display types.
https://halilibo.com/compose-richtext
Apache License 2.0
750 stars 59 forks source link

How to change the base font size in a Material3RichText scope? #122

Closed alexispurslane closed 10 months ago

alexispurslane commented 10 months ago

I'm displaying some Markdown text like so:

Material3RichText {
    Markdown(content = message.content)
}

and one thing I'd really like to be able to do is change the font size of the default text when it's displayed. Is there a way to do this? I looked at the RichTextStyle stuff, but it seems focused on everything but normal text.

alexispurslane commented 10 months ago

Answer to my own question: use ProvideTextStyle with TextStyle(fontSize=<foo>.dp)