Closed sageibra closed 5 months ago
As a workaround, you can insert this custom CSS instead for your preferred font for it will be loaded into the RichText's webview (just replace usage of Lobster with your preferred font):
RichText(html: <html_text_here>)
.fontType(.custom(UIFont.lobster)) // reference the UIFont
.customCSS("""
@font-face {
font-family: 'LobsterTwo-Regular';
src: url("LobsterTwo-Regular.ttf") format('truetype'); // name of your font in Info.plist
}
body {
font-family: 'LobsterTwo-Regular';
}
""")
Hi, when I add new font using fontType modifier nothing changes.