我在网上看到了所有关于在 iPhone OS 中使用自定义字体的困难的讨论.是否可以将我的包中的字体加载到 UIWebView 组件中?
I've seen all the talk on the web about the difficulty of using a custom font in iPhone OS. Is it possible, to load a font from within my bundle into the UIWebView component?
我在Rusty Brick"的名为Omer"的应用程序中看到它......这似乎是一个网络视图,因为我看到了延迟,并且在加载延迟期间,自定义区域是白色的.这可能是什么其他组件?
I saw it in the app called "Omer" by "Rusty Brick"... It seems to be a web view, because I see a delay and during the loading delay the custom area is white. What other component could this have been?
我联系了 Rusty Brick.他们告诉我它是哪种字体.标准字体.
I contacted Rusty Brick. They told me which font it was. A standard font.
iOS3.2及以上的UIWebView可以加载自定义字体.将字体添加到您的捆绑包中(请参阅 在这里) 然后像引用任何其他字体一样引用 UIWebView 样式表中的字体:
It is possible to load custom fonts into your UIWebView in iOS3.2 and above. Add the font to your bundle (see here) then just reference the font in your UIWebView's stylesheet like you would any other font:
<style type='text/css'>font { font-family: DroidSerif; } </style>
这篇关于使用 UIWebView,我可以使用自定义字体吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!