iPhone Development - Setting UIWebView font

后端 未结 9 2042
别那么骄傲
别那么骄傲 2020-11-28 04:00

I have to show rich text that i pull from server, so i\'m using UIWebView. Now the problem is that i have no control over the font which is used in UIWebView. How can i chan

相关标签:
9条回答
  • 2020-11-28 04:52

    I use

    body {
            font-family: 'Noteworthy-Bold';
        }
    

    This works fine for my about-page (WebView), as the rest of my app also uses Apple's "Noteworthy-Bold".

    If you want to use your own font, make use of @font-face and refer to a TTF or EOT file.

    0 讨论(0)
  • 2020-11-28 04:56

    Reference a css style sheet in your HTML document or put the style information into the top of the HTML document itself

    0 讨论(0)
  • 2020-11-28 05:00

    just change

    font:helvetica

    to

    font-family:helvetica

    0 讨论(0)
提交回复
热议问题