gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.53k stars 318 forks source link

Setting a custom font overwrites markdown styles #305

Open peteralt opened 7 months ago

peteralt commented 7 months ago

Describe the bug When I set a custom font for my .text TextStyle, it takes the new font, but any attributes like bold or italic are being overwritten and dismissed.

Sample:

Markdown(text)
    .markdownTextStyle(\.text) {
        FontFamily(.custom(CustomFont.pawp.fontName))
    }

Checklist

Expected behavior I would expect the styling to still apply even with the new custom font.

Version information

Additional context Add any other context about the problem here.