官术网_书友最值得收藏!

Chapter #3. Users Already Have Fonts on Their Computers, So Use Them

Yes, your corporate brand font is lovely. It's so playful and charming but it takes an extra three seconds to load the page, as the font needs to be downloaded from the server and rendered—and nothing appears until it loads—driving your users crazy.

Including custom display fonts for headings and titles is fine; it helps to brand the product and adds some visual interest. However, using custom fonts for body copy is generally a bad idea.

First of all, these fonts have to be loaded from somewhere, whether it's Google Fonts, Typekit or your own CDN. This means that there is an overhead in getting the font files down to the user's machine. Content-heavy pages will often break while the correct fonts are downloaded and rendered—the dreaded Flash of unstyled content or Flash of unstyled text (FOUC) (https://en.wikipedia.org/wiki/Flash_of_unstyled_content).

Secondly, if, by specifying wild and wonderful body copy typefaces, you think you're exerting some control over the end result, then think again: responsive design and 1,000s of different devices out in the wild mean your pages will look a little different for everyone.

Luckily, whether your user is on a phone or a desktop, Windows or Mac (or Linux), they have some beautiful, highly-readable fonts already installed and waiting to be used. The "system font stack" is a CSS rule that tells modern browsers to render type in the system-native typeface.

In most cases, using system-native fonts makes pages appear more quickly, and the type look sharper and more readable.

Font-family:
        apple-system
        BlinkMacSystemFont
        Segoe UI
        Roboto
        Oxygen-Sans
        Ubuntu
        Cantarell
        Helvetica Neue
        sans-serif

Please, just use the system font stack.

主站蜘蛛池模板: 宜兰县| 衡阳市| 合阳县| 桦南县| 资源县| 成安县| 台东县| 上虞市| 罗城| 沅江市| 叶城县| 赤峰市| 德令哈市| 册亨县| 郯城县| 朝阳区| 商水县| 苏州市| 崇左市| 阳信县| 永修县| 微山县| 张家界市| 四平市| 天祝| 永宁县| 澄江县| 亳州市| 泗水县| 盘锦市| 玛纳斯县| 蛟河市| 榆中县| 广汉市| 田林县| 财经| 牡丹江市| 龙江县| 丹凤县| 堆龙德庆县| 长顺县|