简体   繁体   English

改善iPhone上的cufon字体性能?

[英]Improve cufon font performance on iPhone?

I'm using the Cufon font replacement tool on iPhone. 我正在iPhone上使用Cufon字体替换工具。 Unfortunately, it's really slow there. 不幸的是,那里真的很慢。 (On a small 50 word page it takes about 2 seconds on my first-gen iPhone.) (在50字小的页面上,在我的第一代iPhone上大约需要2秒钟。)

Are there any optimizations I can make to improve performance? 我可以做些优化来提高性能吗? (If you have multiple tips, please split them out into multiple answers so they can be voted up separately.) (如果您有多个提示,请将其拆分为多个答案,以便分别进行投票。)

Turns out that there IS something I can do to make it a lot faster: avoid forcing Cufon to iterate over non-text nodes. 事实证明,我可以做一些事情来使其更快:避免强迫Cufon遍历非文本节点。 By passing explicit divs to replace, Cufon performance considerably improved; 通过传递明确的div来替换,Cufon的性能大大提高了; it's now well under a second. 现在不到一秒钟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM