jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
590 stars 50 forks source link

style.fontFamily does nothing #113

Closed jbb1003 closed 3 months ago

jbb1003 commented 3 months ago

Summary: Although looking at the code shows support for fontFamily, I cannot make it work.

To reproduce:

@Preview
@Composable
fun DebugMarkDown() {
    Column(modifier = Modifier.background(Color.Blue)) {
        val style = TextStyle(fontFamily = FontFamily.Cursive, color = Color.White)
        val s = "Test"
        Text(text = s,
            style = style)
        MarkdownText(
            markdown = s,
            style = style
        )
    }
}

which previews as:

Screenshot 2024-07-29 at 13 20 59

Expectation: Text would be rendered identically for both Text() and MarkdownText()

Actual: Text() renders using fontFamily, but MarkdownText ignores it.

jbb1003 commented 3 months ago

I wasn't using the latest version which DOES have fontFamily support.