开发者

Speed up mobile safari font-face rendering?

开发者 https://www.devze.com 2023-02-24 04:56 出处:网络
i render customs fonts in a webview on the iPad. render开发者_运维技巧ing works and the fonts get displayed as they should. but, the rendering is slow. so everything is on my pages loads up quickly, e

i render customs fonts in a webview on the iPad. render开发者_运维技巧ing works and the fonts get displayed as they should. but, the rendering is slow. so everything is on my pages loads up quickly, except for the font-face. any idea how i can speed up things?

thanks


There are a few options you have to optimise your font-face rules. By using a data: url you can use the font inline by encoding in base64. For example:

@font-face {
    font-family: "My Font";
    src: url("data:font/opentype;base64,[base-encoded font here]");
}

There are some other useful performance considerations and approaches outlined in this article from 2009.

0

精彩评论

暂无评论...
验证码 换一张
取 消