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

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.

主站蜘蛛池模板: 乌拉特后旗| 长白| 盐源县| 新乐市| 涿州市| 集安市| 武威市| 蒲江县| 离岛区| 禄劝| 大英县| 大庆市| 乐业县| 东方市| 齐齐哈尔市| 桐柏县| 曲阳县| 岑溪市| 黄陵县| 云梦县| 江华| 红原县| 漾濞| 舒城县| 凌云县| 元朗区| 镇宁| 运城市| 广东省| 衡南县| 安义县| 嘉定区| 阜阳市| 浦江县| 闸北区| 湘西| 原阳县| 育儿| 南木林县| 遂溪县| 包头市|