{"id":5974,"date":"2017-02-23T23:21:07","date_gmt":"2017-02-23T15:21:07","guid":{"rendered":"http:\/\/www.zhangxinxu.com\/wordpress\/?p=5974"},"modified":"2017-02-23T23:23:54","modified_gmt":"2017-02-23T15:23:54","slug":"font-kerning-font-smoothing-font-variant","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/02\/font-kerning-font-smoothing-font-variant\/","title":{"rendered":"\u4e86\u89e3CSS\u5c5e\u6027font-kerning,font-smoothing,font-variant"},"content":{"rendered":"<p>by <a href=\"http:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=5974\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=5974<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u4f46\u9700\u5f97\u5230\u539f\u4f5c\u8005\u4e66\u9762\u8bb8\u53ef\uff0c\u540c\u65f6\u4fdd\u7559\u539f\u4f5c\u8005\u548c\u51fa\u5904\uff0c\u6458\u8981\u5f15\u6d41\u5219\u968f\u610f\u3002<\/p>\n<p>\u672c\u6587\u5f88\u7b80\u5355\uff0c\u4e86\u89e3\u51e0\u4e2a\u53ef\u80fd\u5e73\u65f6\u7528\u5f97\u4e0d\u592a\u591a\uff0c\u957f\u5f97\u4e0d\u592a\u719f\u7684<code>font<\/code>\u76f8\u5173\u7684\u51e0\u4e2aCSS\u5c5e\u6027\uff0c\u5206\u522b\u662f\uff1a<code>font-kerning<\/code>, <code>font-smoothing<\/code>\u548c<code>font-variant<\/code>\u3002<\/p>\n<h3>\u4e00\u3001\u5b57\u8ddd\u8c03\u6574\u5c5e\u6027font-kerning<\/h3>\n<p><code>font-kerning<\/code>\u5e94\u8be5\u7b97\u662f\u4e00\u4e2aCSS3\u5c5e\u6027\uff0c\u4e3b\u8981\u4f5c\u7528\u662f\u8c03\u6574\u5b57\u5f62\u95f4\u8ddd\uff0c\u4e14\u57fa\u672c\u4e0a\u662f\u82f1\u6587\u5b57\u7b26\u5f62\u72b6\u7684\u95f4\u8ddd\uff0c\u56e0\u4e3a\u82f1\u6587\u5b57\u7b26\u5f62\u72b6\u90fd\u662f\u4e0d\u89c4\u5219\u7684\uff0c\u6709\u5bbd\u6709\u7a84\uff0c\u6709\u7684\u5706\u4e4e\u4e4e\uff0c\u6709\u7684\u68f1\u89d2\u5206\u660e\uff0c\u5c31\u4f1a\u5bfc\u81f4\u6392\u5217\u5728\u4e00\u8d77\u7684\u65f6\u5019\u758f\u5bc6\u4e0d\u4e00\u81f4\uff0c\u800c<code>font-kerning<\/code>\u53ef\u4ee5\u6709\u6548\u5229\u7528\u5b57\u7b26\u5f62\u72b6\u95f4\u7684\u95f4\u9699\uff0c\u4f7f\u5b57\u5f62\u4e4b\u95f4\u7684\u7a7a\u95f4\u66f4\u52a0\u76f8\u4f3c\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff08\u56fe\u6765\u81ea<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-kerning\" target=\"_blank\">MDN\u6587\u6863<\/a>\uff09\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201702\/font-kerning.png\" width=\"318\" height=\"222\" alt=\"\u5b57\u5f62\u95f4\u9699\" class=\"alignnone\" \/><\/p>\n<p>\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>font-kerning: auto | normal | none<\/pre>\n<p>\u5176\u4e2d\uff1a<\/p>\n<dl>\n<dt><code>auto<\/code><\/dt>\n<dd>\u9ed8\u8ba4\u503c\u3002\u6d4f\u89c8\u5668\u81ea\u5df1\u51b3\u5b9a\u662f\u5426\u8981\u5b57\u8ddd\u8c03\u6574\u3002\u4f8b\u5982\u5b57\u53f7\uff0c\u4e5f\u5c31\u662f<code>font-size<\/code>\u5c5e\u6027\u503c\u6bd4\u8f83\u5c0f\u7684\u65f6\u5019\uff0c\u5982\u679c\u8fdb\u884c\u5b57\u8ddd\u8c03\u6574\u5c31\u4f1a\u663e\u5f97\u5f88\u5947\u602a\uff0c\u56e0\u6b64\uff0c\u6d4f\u89c8\u5668\u4f1a\u7981\u6b62\u3002<\/dd>\n<dt><code>normal<\/code><\/dt>\n<dd>\u5e94\u7528\u5b57\u8ddd\u8c03\u6574\u3002<\/dd>\n<dt><code>none<\/code><\/dt>\n<dd>\u4e0d\u6839\u636e\u5b57\u4f53\u6587\u4ef6\u4e2d\u7684\u5b57\u8ddd\u4fe1\u606f\u8fdb\u884c\u5b57\u8ddd\u8c03\u6574\u3002<\/dd>\n<\/dl>\n<p>\u4f46\u662f\uff0c<code>font-kerning<\/code>\u5e76\u4e0d\u662f\u4ec0\u4e48\u65f6\u5019\u90fd\u6709\u4f5c\u7528\u7684\u3002<\/p>\n<ol>\n<li>\u4e00\u822c\u4e2d\u6587\u662f\u65e0\u6548\u7684\uff0c\u4e2d\u6587\u6c49\u5b57\u672c\u8eab\u5c31\u662f\u65b9\u65b9\u6b63\u6b63\uff0c\u4e00\u822c\u6ca1\u6709\u5fc5\u8981\u7528\u5230\u5b57\u8ddd\u8c03\u6574\uff0c\u9664\u975e\u662f\u884c\u4e66\u6216\u8005\u8349\u4e66\u6216\u8005\u4e00\u4e9b\u624b\u5199\u4f53\u5b57\u4f53\u3002<\/li>\n<li>\u5fc5\u987b\u662f\u5177\u6709\u5b57\u8ddd\u8c03\u6574\u4fe1\u606f\u7684OpenType\u5b57\u4f53<sup>\u2460<\/sup>\u624d\u6709\u7528\uff0c\u5982\u679c\u5b57\u4f53\u6587\u4ef6\u6ca1\u6709\u5b57\u8ddd\u8c03\u6574\u4fe1\u606f\u6216\u8005\u4e0d\u662fOpenType\u5b57\u4f53\uff0c\u90fd\u662f\u6ca1\u6548\u679c\u7684\u3002<\/li>\n<li>IE\u6d4f\u89c8\u5668\uff0c\u5305\u62ecedge\u7248\u672c\u90fd\u662f\u6ca1\u6548\u679c\u7684\uff0ciOS\u76ee\u524d\u9700\u8981\u79c1\u6709\u524d\u7f00\u3002\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201702\/2017-02-23_214856.png\" width=\"610\" height=\"284\" alt=\"font-smoothing\u6d4f\u89c8\u5668\u517c\u5bb9\u6027\u622a\u56fe\" class=\"alignnone\" \/><\/li>\n<\/ol>\n<blockquote><p>\u2460 OpenType\u4e5f\u53ebType 2\u5b57\u4f53\uff0c\u662f\u7531Microsoft\u548cAdobe\u516c\u53f8\u5f00\u53d1\u7684\u53e6\u5916\u4e00\u79cd\u5b57\u4f53\u683c\u5f0f\u3002\u5b83\u4e5f\u662f\u4e00\u79cd\u8f6e\u5ed3\u5b57\u4f53\uff0c\u6bd4TrueType\u66f4\u4e3a\u5f3a\u5927\uff0c\u6700\u660e\u663e\u7684\u4e00\u4e2a\u597d\u5904\u5c31\u662f\u53ef\u4ee5\u5728\u628aPostScript\u5b57\u4f53\u5d4c\u5165\u5230TrueType\u7684\u8f6f\u4ef6\u4e2d\u3002\u5e76\u4e14\u8fd8\u652f\u6301\u591a\u4e2a\u5e73\u53f0\uff0c\u652f\u6301\u5f88\u5927\u7684\u5b57\u7b26\u96c6\uff0c\u8fd8\u6709\u7248\u6743\u4fdd\u62a4\u3002\u53ef\u4ee5\u8bf4\u5b83\u662fType 1\u548cTrueType\u7684\u8d85\u96c6\u3002OpenType\u6807\u51c6\u8fd8\u5b9a\u4e49\u4e86OpenType\u6587\u4ef6\u540d\u79f0\u7684\u540e\u7f00\u540d\u3002\u5305\u542bTureType\u5b57\u4f53\u7684OpenType\u6587\u4ef6\u540e\u7f00\u540d\u4e3a<code>.ttf<\/code>\uff0c\u5305\u542bPostScript\u5b57\u4f53\u7684\u6587\u4ef6\u540e\u7f00\u540d\u4e3a<code>.OTF<\/code>\u3002\u5982\u679c\u662f\u5305\u542b\u4e00\u7cfb\u5217TrueType\u5b57\u4f53\u7684\u5b57\u4f53\u5305\u6587\u4ef6\uff0c\u90a3\u4e48\u540e\u7f00\u540d\u4e3a<code>.TTC<\/code>\u3002<\/p><\/blockquote>\n<p>\u53e6\u5916\uff0c<code>font-kerning<\/code>\u7684\u5b57\u8ddd\u8c03\u6574\u5e76\u4e0d\u662f\u6240\u6709\u5b57\u7b26\u90fd\u6709\u6548\u7684\uff0c\u5982\u679c\u5e0c\u671b\u6240\u6709\u5b57\u7b26\u95f4\u8ddd\u90fd\u6709\u8c03\u6574\uff0c\u5e94\u8be5\u4f7f\u7528CSS\u5c5e\u6027<code>letter-spacing<\/code>\uff0c\u8fd9\u4e2a\u5927\u5bb6\u5e94\u8be5\u6bd4\u8f83\u719f\u3002<\/p>\n<p>\u66f4\u591a\u5173\u4e8e\u5b57\u8ddd\u8c03\u6574\u8c03\u6574\u7684\u4fe1\u606f\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u9762\u51e0\u7bc7\u6587\u7ae0\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/www.elliotjaystocks.com\/blog\/kerning\/\">Advanced web typography: Kerning<\/a> by Elliot Jay Stocks<\/li>\n<li><a href=\"https:\/\/blog.typekit.com\/2014\/02\/05\/kerning-on-the-web\/\">Kerning on the Web<\/a> by Bram Stein<\/li>\n<li><a href=\"http:\/\/artequalswork.com\/posts\/manual-kerning\/\">A Manual Kerning Method for the Web<\/a> by Nathan Ford<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u6587\u5b57\u5e73\u6ed1\u5c5e\u6027font-smoothing<\/h3>\n<p><code>font-smoothing<\/code>\u51b3\u5b9a\u4e86\u6d4f\u89c8\u5668\u5982\u4f55\u63a7\u5236\u5b57\u4f53\u4e0d\u8981\u51fa\u73b0\u952f\u9f7f\uff0c\u56e0\u4e3a\u6d4f\u89c8\u5668\u4e2d\u5b57\u4f53\u5448\u73b0\u7684\u6548\u679c\u53ef\u80fd\u548c\u8bbe\u8ba1\u8f6f\u4ef6\u4e2d\u7684\u6709\u51fa\u5165\uff0c<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-smooth\" target=\"_blank\">MDN\u6587\u6863<\/a>\u4e0a\u663e\u793a\u8fd9\u4e2a\u5c5e\u6027\u5e94\u8be5\u540d\u53eb<code>font-smooth<\/code>\uff0c\u4ec0\u4e48\u9b3c\uff1f\u7ed3\u679c\u662f\u975e\u6807\u51c6\u7684\uff0c\u7ed3\u679c\u6ca1\u6709\u4e00\u4e2a\u6d4f\u89c8\u5668\u7528\u8fd9\u4e2a\u540d\u5b57\uff0c\u7ed9\u4eba\u611f\u89c9<code>font-smooth<\/code>\u8fd9\u4e2a\u5c5e\u6027\u540d\u5e94\u8be5\u662fYY\u51fa\u6765\u7684\u5427\uff0c\u5b9e\u9645\u662f\uff0c\u662f<a href=\"https:\/\/www.w3.org\/TR\/WD-font\/#font-smooth\" target=\"_blank\">\u8001\u7684W3C\u7684\u63d0\u6848<\/a>\u66fe\u6709\u5173\u4e8e<code>font-smooth<\/code>\u7684\u5185\u5bb9\uff01<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0cChrome\u7b49webkit\u6d4f\u89c8\u5668\u4f7f\u7528\u7684\u662f<code>-webkit-font-smoothing<\/code>\uff0cFirefox\u6d4f\u89c8\u5668\u4e0b\u662f<code>-moz-osx-font-smoothing<\/code>\uff0c<\/p>\n<p>\u76f8\u5173\u8bed\u6cd5\u548c\u542b\u4e49\u5982\u4e0b\uff1a<br \/>\n<strong>-webkit-font-smoothing<\/strong><\/p>\n<dl>\n<dt><code>none<\/code><\/dt>\n<dd>\u5173\u95ed\u6297\u952f\u9f7f\uff0c\u5b57\u4f53\u8fb9\u7f18\u7280\u5229\u3002<\/dd>\n<dt><code>antialiased<\/code><\/dt>\n<dd>\u5b57\u4f53\u50cf\u7d20\u7ea7\u5e73\u6ed1\uff0c\u5728\u6df1\u8272\u80cc\u666f\u4e0a\u4f1a\u8ba9\u6587\u5b57\u770b\u8d77\u6765\u66f4\u7ec6\u4e86\u3002<\/dd>\n<dt><code>subpixel-antialiased<\/code><\/dt>\n<dd>\u5b57\u4f53\u4e9a\u50cf\u7d20\u7ea7\u5e73\u6ed1\uff0c\u4e3b\u8981\u4e3a\u4e86\u5728\u975e\u89c6\u7f51\u819c\u8bbe\u5907\u4e0b\u66f4\u597d\u7684\u663e\u793a\u3002<\/dd>\n<\/dl>\n<p><strong>-moz-osx-font-smoothing<\/strong><\/p>\n<dl>\n<dt><code>auto<\/code><\/dt>\n<dd>\u89c8\u5668\u53ea\u80fd\u9009\u62e9\u5b57\u4f53\u6e32\u67d3\u8868\u73b0\u3002<\/dd>\n<dt><code>grayscale<\/code><\/dt>\n<dd\u7070\u5ea6\u6297\u952f\u9f7f\u6e32\u67d3\u3002\u4ece\u6548\u679c\u4e0a\u770b\uff0c\u7c7b\u4f3c\u4e8e<code>webkit<\/code>\u4e0b\u7684<code>\"antialiased\"<\/code>\uff0c\u53ef\u4ee5\u8ba9\u6df1\u8272\u80cc\u666f\u4e0b\u7684\u6587\u5b57\u770b\u8d77\u6765\u66f4\u7ec6\u3002<\/dd>\n<\/dl>\n<p>\u6309\u7167\u6211\u4e2a\u4eba\u7684\u4f7f\u7528\u7ecf\u9a8c\u6765\u770b\uff0c\u6587\u5b57\u5e73\u6ed1\u5c5e\u6027<code>font-smoothing<\/code>\u5728windows\u8bbe\u5907\u4e0b\u597d\u50cf\u90fd\u662f\u6253\u9171\u6cb9\u7684\uff0c\u5404\u4e2a\u5c5e\u6027\u503c\u770b\u4e0d\u51fa\u5dee\u522b\uff0c\u6216\u8bb8\u4e0e\u663e\u793a\u5668\u7684\u8bbe\u5907\u50cf\u7d20\u6bd4\u6709\u5173\uff0c\u5728OS X\u8bbe\u5907\u4e0b\u6e32\u67d3\u6709\u7740\u660e\u663e\u7684\u6548\u679c\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5728\u975eretina\u5c4f\u5e55\u4e0b\u7684iMac\u663e\u793a\u5668\u7684\u5fae\u8f6f\u96c5\u9ed1\u5b57\u4f53\uff0c\u7c97\u5f97\u50cf\u503e\u56fd\u503e\u57ce\u4e2d\u7684\u201c\u503e\u56fd\u201d\uff08\u4e0b\u56fe\u5de6\uff09\uff0c\u4f7f\u7528<code>-webkit-font-smoothing:antialiased<\/code>\uff0c\u7acb\u9a6c\u53d8\u6210\u4e86\u201c\u503e\u57ce\u201d\uff08\u4e0b\u56fe\u53f3\uff09\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201702\/qingguo.jpg\" width=\"138\" height=\"220\" alt=\"\u503e\u56fd\" class=\"alignnone\" \/> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201702\/qingchen.jpg\" width=\"138\" height=\"220\" alt=\"\u503e\u57ce\" class=\"alignnone\" \/><\/p>\n<p>\u4e8e\u662f\uff0c\u5c31\u6709\u4e86\u5982\u4e0b\u7684\u5b9e\u8df5\u4ee3\u7801\uff1a<\/p>\n<pre>body { -webkit-font-smoothing: antialiased; }\n@media \n(-webkit-min-device-pixel-ratio: 1.5), \n(min-resolution: 2dppx){ \n    <span style=\"color:green;\">\/* Retina\u4e0b\u4ecd\u4f7f\u7528\u9ed8\u8ba4\u5b57\u4f53\u6e32\u67d3 *\/<\/span>\n    body { -webkit-font-smoothing: subpixel-antialiased; }\n}<\/pre>\n<p>\u5f53\u7136\uff0cOS X\u4e0b\u63a8\u8350\u82f9\u65b9\u6216\u8005\u9ed8\u8ba4\u7cfb\u7edf\u5b57\u4f53\u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u201c\u5fae\u8f6f\u96c5\u9ed1\u201d\u4e0d\u662f\u597d\u9009\u62e9\u3002<\/p>\n<h3>\u4e09\u3001\u5c0f\u4f53\u578b\u5927\u5199\u5b57\u6bcdfont-variant<\/h3>\n<p><code>font-variant<\/code>\u662f\u4e2aIE6\u65f6\u4ee3\u5c31\u8fc7\u6765\u7684CSS\u5c5e\u6027\uff0c\u5bf9\u4e8e\u6211\u4eec\u5927\u4e2d\u534e\u7528\u6237\uff0c\u5176\u652f\u6301\u7684\u5c5e\u6027\u548c\u4f5c\u7528\u8ba9\u6211\u4eec\u8fd9\u4e9b\u5916\u6765\u4eba\u89c9\u5f97\u6709\u4e9b\u86cb\u75bc\uff0c\u5b9e\u73b0\u5c0f\u4f53\u578b\u5927\u5199\u5b57\u6bcd\uff0c\u4e24\u4e2a\u5c5e\u6027\u503c\uff0c\u8981\u4e48<code>normal<\/code>\u8981\u4e48<code>small-caps<\/code>\uff0c<code>font-variant:small-caps<\/code>\u5c31\u662f\u53ef\u4ee5\u8ba9\u82f1\u6587\u5b57\u7b26\u8868\u73b0\u4e3a\u5c0f\u4f53\u578b\u5927\u5199\u5b57\u6bcd\u3002<\/p>\n<p>\u5982\u4e0b\u4ee3\u7801\u793a\u610f\uff1a<\/p>\n<pre>http:\/\/www.&lt;span style=\"font-variant:small-caps\"&gt;zhangxinxu.com&lt;span&gt;\/wordpress\/?p=5974<\/pre>\n<p>\u7ed3\u679c\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<p>http:\/\/www.<span style=\"font-variant:small-caps;\">zhangxinxu.com<\/span>\/wordpress\/?p=5974<\/p>\n<p>\u4e5f\u5c31\u662f\u5927\u5c0f\u8ddf\u5c0f\u5199\u5b57\u6bcd\u4e00\u6837\uff0c\u4f46\u6837\u5f0f\u662f\u5927\u5199\u3002\u4f46\u6211\u5b9e\u5728\u641e\u4e0d\u61c2\u8fd9\u79cd\u5b57\u7b26\u8bbe\u7f6e\u5728\u4ec0\u4e48\u573a\u666f\u4e0b\u4f1a\u4f7f\u7528\u5462\uff1f<\/p>\n<p>\u7136\u540e\uff0c\u8fdb\u5165\u4e86CSS3\u7684\u65f6\u4ee3\u540e\uff0c\u539f\u672c\u5355\u4e00\u7684<code>font-variant<\/code>\u5c5e\u6027\u8fce\u6765\u4e86\u5168\u9762\u5347\u7ea7\uff0c\u53d8\u6210\u4e86\u4e00\u79cd\u7f29\u5199\u683c\u5f0f\uff0c\u5e76\u4e14\u662f\u4e0b\u9762\u8fd9\u4e9b\u5c5e\u6027\u7684\u7f29\u5199\uff1a <code>font-variant-caps<\/code>, <code>font-variant-numeric<\/code>, <code>font-variant-alternates<\/code>, <code>font-variant-ligatures<\/code>, \u4ee5\u53ca<code>font-variant-east-asian<\/code>\u3002<\/p>\n<p>\u7acb\u9a6c\u53d8\u5f97\u5f88\u5389\u5bb3\u7684\u6837\u5b50\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\u968f\u4fbf\u62ce\u4e00\u4e2a<code>font-variant-alternates<\/code>\u5c5e\u6027\uff0c\u5176\u8bed\u6cd5\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<pre>font-variant-alternates: normal;\nfont-variant-alternates: historical-forms;\nfont-variant-alternates: stylistic(user-defined-ident);\nfont-variant-alternates: styleset(user-defined-ident);\nfont-variant-alternates: character-variant(user-defined-ident);\nfont-variant-alternates: swash(user-defined-ident);\nfont-variant-alternates: ornaments(user-defined-ident);\nfont-variant-alternates: annotation(user-defined-ident);\nfont-variant-alternates: swash(ident1) annotation(ident2);<\/pre>\n<p>\u5413\u5f97\u6211\u559d\u6c34\u90fd\u545b\u5230\u4e86\uff0c\u652f\u6301\u7684\u5c5e\u6027\u503c\u591a\u5230\u6ca1\u4ec0\u4e48\uff0c\u4f46\u662f\u641e\u8fd9\u4e48\u591a\u4e0d\u8ba4\u8bc6\u7684\u5355\u8bcd\u662f\u95f9\u90a3\u6837\uff0c\u800c\u4e14\u8fd8\u662f\u51fd\u6570\u4f53\u3002\u597d\u5728\u76ee\u524d\u5c31Firefox\u6d4f\u89c8\u5668\u652f\u6301\u6bd4\u8f83high\uff0c\u54b1\u5b66\u4e60\u53ef\u4ee5\u7f13\u4e00\u7f13\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u8c8c\u4f3c\u548c<code>font-variant<\/code>\u6709\u5bc6\u5207\u5173\u7cfb\u7684<code>font-feature-settings<\/code>\u5c5e\u6027\u7684\u6d4f\u89c8\u5668\u517c\u5bb9\u6027\u5c31\u5b8c\u5168\u4e0d\u4e00\u6837\u4e86\uff0c\u5df2\u7ecf\u7eff\u6cb9\u6cb9\u5230\u5bb6\u95e8\u53e3\u5566\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201702\/2017-02-23_230354.png\" width=\"615\" height=\"306\" alt=\"font-feature-settings\u517c\u5bb9\u6027\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p>\u6211\u7b80\u5355\u4e86\u89e3\u4e86\u4e0b\uff0c\u53d1\u73b0\u8fd9\u91cc\u9762\u7684\u6c34\u597d\u6df1\u597d\u6df1\uff0c\u6d89\u53ca\u5230\u5b57\u4f53\u5b57\u5f62\u8bbe\u8ba1\u548c\u5404\u79cd\u5b57\u7b26\u8868\u73b0\u7b49\u7b49\uff0c\u6bd4\u65b9\u8bf4\u4e0b\u9762\u8fd9\u6bb5CSS\u8bed\u53e5\u4f60\u77e5\u9053\u4ec0\u4e48\u610f\u601d\u5417\uff1f<\/p>\n<pre><span style=\"color:green;\">\/* format: feature-tag=[0,1] with 0 to disable, 1 to enable *\/\n  \/* dlig = discretionary ligatures, ss01 = stylistic set 1 *\/<\/span>\nfont-feature-settings: \"dlig=1,ss01=1\";<\/pre>\n<p>\u591a\u534a\u5927\u773c\u77aa\u5c0f\u773c\uff0c\u6240\u4ee5\uff0c\u672c\u6587\u5c31\u4e0d\u56eb\u56f5\u4ecb\u7ecd\u4e86\uff0c\u4ee5\u540e\u65f6\u673a\u6210\u719f\u518d\u4e13\u95e8\u6df1\u5165\u4ecb\u7ecd\u3002<\/p>\n<p>\u603b\u4e4b\uff0c\u5927\u5bb6\u77e5\u9053\u5982\u4eca\u7684<code>font-variant<\/code>\u5df2\u7ecf\u4e0d\u662f\u5f53\u5e74\u7684\u5c0f\u767d\u83dc\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<h3>\u56db\u3001\u7ed3\u675f\u8bed<\/h3>\n<p>\u4ece\u6211\u6574\u7406\u672c\u6587\u76f8\u5173\u77e5\u8bc6\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0\u6709\u4e2a\u4e1c\u897f\u51fa\u73b0\u7684\u9891\u7387\u5f88\u9ad8\uff08\u867d\u7136\u6587\u4e2d\u63d0\u53ca\u9891\u7387\u5e76\u4e0d\u9ad8\uff09\uff0c\u90a3\u5c31\u662f<code>OpenType fonts<\/code>\uff0c\u8c8c\u4f3c\u5f88\u591a\u65b0\u7684<code>font<\/code>\u76f8\u5173\u7684CSS\u5c5e\u6027\u7684\u8868\u73b0\u548c\u6e32\u67d3\u90fd\u548c<code>OpenType fonts<\/code>\u6709\u5bc6\u5207\u5173\u7cfb\uff0c\u4e4b\u524d\u770b\u76f8\u5173\u6587\u6863\u8349\u6848\u7684\u65f6\u5019\uff0c\u4e5f\u6709\u76f8\u5f53\u76f8\u5f53\u5927\u7684\u7bc7\u5e45\u5c06\u5b57\u4f53\u76f8\u5173\u5f88\u591a\u6df1\u5165\u7684\u7ec6\u8282\u3002<\/p>\n<p>\u8ba9\u6211\u89c9\u5f97\u5728\u6587\u672c\u5b57\u4f53\u6e32\u67d3\u548c\u5448\u73b0\u8fd9\u4e00\u5757\uff0c\u6c34\u975e\u5e38\u6df1\uff0c\u76ee\u524d\u6240\u51fa\u6765\u7684\u8fd9\u4e9b\u4e1c\u897f\u5e94\u8be5\u624d\u521a\u521a\u5f00\u59cb\u4e2a\u5934\uff0c\u4ee5\u540e\u8981\u5b66\u4e60\u548c\u8981\u6df1\u5165\u7684\u4e1c\u897f\u5c31\u591a\u4e86\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u4e5f\u4e0d\u4e00\u5b9a\uff0c\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u8bf4\u5462\uff1f\u6307\u5b9a\u89c4\u8303\u7684\u90fd\u662f\u8001\u5916\uff0c\u4f7f\u7528\u7684\u4f7f\u7528\u82f1\u6587\uff0c\u5f88\u591a\u89c4\u5219\u8bf4\u4e0d\u5b9a\u5bf9\u4e8e\u6c49\u5b57\u5e76\u4e0d\u9002\u7528\uff0c\u5c31\u597d\u6bd4<code>font-variant:small-caps<\/code>\uff0c\u6211\u4eec\u4e5f\u5c31\u770b\u770b\u4e24\u773c\uff0c\u5b9e\u9645\u9879\u76ee\u4f7f\u7528\u7684\u6982\u7387\u8ddf\u5e74\u4f1a\u4e2d\u5956\u6982\u7387\u662f\u4e00\u6837\u4f4e\u7684\u3002<\/p>\n<p>\u8981\u4e0d\uff0c\u5c31\u8bf4\u8fd9\u4e48\u591a\uff0c\u65e5\u540e\u7b49\u77e5\u8bc6\u79ef\u7d2f\u8db3\u591f\uff0c\u518d\u6df1\u5165\u8fd9\u4e9b\u6216\u5176\u4ed6<code>font<\/code>\u76f8\u5173CSS\u5c5e\u6027\u503c\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201611\/14.png\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=5974\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=5974<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u5f88\u7b80\u5355\uff0c\u4e86\u89e3\u51e0\u4e2a\u53ef\u80fd\u5e73\u65f6\u7528\u5f97\u4e0d\u592a\u591a\uff0c\u957f\u5f97\u4e0d\u592a\u719f\u7684<code>font<\/code>\u76f8\u5173\u7684\u51e0\u4e2aCSS\u5c5e\u6027\uff0c\u5206\u522b\u662f\uff1a<code>font-kerning<\/code>, <code>font-smoothing<\/code>\u548c<code>font-variant<\/code>\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[416,1109,1106,1108,1107,1110,258],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/5974"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=5974"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/5974\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=5974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=5974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=5974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}