Post

Replies

Boosts

Views

Activity

Custom fonts with AttributedString and Markdown
What is the best way to customize rendering of Markdown styles, in both UIKit and Swift? For instance, how should I tell it what font to use for normal and Bold text? This is what kept us from using NSAttributedString+HTML for embedded string formatting in the past, and AttributedString+Markdown looks even better for this use case, so I'm hoping the fact that we use a custom font won't be a roadblock. Is calling .replaceAttributes() the expected pattern, and just doing this for each expected attribute in each string?
3
0
5.4k
Nov ’21
Custom fonts with AttributedString and Markdown
What is the best way to customize rendering of Markdown styles, in both UIKit and Swift? For instance, how should I tell it what font to use for normal and Bold text? This is what kept us from using NSAttributedString+HTML for embedded string formatting in the past, and AttributedString+Markdown looks even better for this use case, so I'm hoping the fact that we use a custom font won't be a roadblock. Is calling .replaceAttributes() the expected pattern, and just doing this for each expected attribute in each string?
Replies
3
Boosts
0
Views
5.4k
Activity
Nov ’21