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

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.

主站蜘蛛池模板: 龙州县| 鹰潭市| 昭平县| 永胜县| 兴文县| 永济市| 同仁县| 洞头县| 阿拉善左旗| 定结县| 朝阳区| 都兰县| 上高县| 大安市| 南昌市| 庐江县| 翁源县| 沐川县| 广宗县| 齐齐哈尔市| 新宾| 清原| 于田县| 商南县| 金坛市| 信宜市| 交城县| 菏泽市| 晋中市| 麻江县| 昌邑市| 建始县| 无为县| 沙田区| 论坛| 青海省| 双桥区| 阿瓦提县| 利川市| 额敏县| 鹤山市|