Trying to use custom font in WKWebView but no luck.
let htmlString = "<span style="font-family: 'OpenSans-Bold'; font-size: 30; color: white">(Utils.aboutUsText)</span>"
webView.loadHTMLString(htmlString, baseURL: nil)
I can use HelveticaNeue-Bold and works great but not with the custom font above.
let htmlString = "<span style="font-family: 'HelveticaNeue'; font-size: 30; color: white">(Utils.aboutUsText)</span>"
webView.loadHTMLString(htmlString, baseURL: nil)
I have added the custom fonts properly.See screenshots.
Can someone please tell me how can i achieve this or point me in the right direction.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…