{"id":895,"date":"2013-12-17T10:37:35","date_gmt":"2013-12-17T02:37:35","guid":{"rendered":"http:\/\/www.awaysoft.com\/taor\/?p=895"},"modified":"2014-04-03T15:17:56","modified_gmt":"2014-04-03T07:17:56","slug":"font-face-%e8%a7%a3%e5%86%b3wkhtmltopdf%e7%9a%84%e4%b8%ad%e6%96%87%e6%98%be%e7%a4%ba%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/actom.me\/blog\/font-face-%e8%a7%a3%e5%86%b3wkhtmltopdf%e7%9a%84%e4%b8%ad%e6%96%87%e6%98%be%e7%a4%ba%e9%97%ae%e9%a2%98.html","title":{"rendered":"@font-face \u89e3\u51b3wkhtmltopdf\u7684\u4e2d\u6587\u663e\u793a\u95ee\u9898"},"content":{"rendered":"<p>\u4e00\u76f4\u4f7f\u7528wkhtmltopdf\u6765\u505ahtml\u8f6cpdf\u7684\u5de5\u4f5c\uff0c\u4f46\u662f\u5f88\u5947\u602a\u7684\u53d1\u73b0\uff0c\u5728CentOS 6\u4e2d\uff0chtml\u4e2dfont-family\u6807\u6ce8\u4e3aSimsun\u548c\u5b8b\u4f53\u7684\u6240\u6709\u6587\u5b57\u90fd\u663e\u793a\u4e0d\u51fa\u6765\uff0c\u6298\u817e\u4e86\u5f88\u4e45\u90fd\u6ca1\u89e3\u51b3\uff0c\u4eca\u5929\u7a81\u7136\u60f3\u5230css3\u4e2d\u6709\u4e2a\u81ea\u5b9a\u4e49\u5b57\u4f53\u6765\u7740\u7684\uff0c\u8bd5\u4e86\u4e0b\uff0c\u95ee\u9898\u89e3\u51b3(\u8fd9\u4e5f\u53ea\u662f\u4e2a\u6cbb\u6807\u7684\u65b9\u6cd5)\u3002<\/p>\n<p>\u518d\u5934\u90e8\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<blockquote><p>&lt;style&gt;<br \/>\n@font-face{<br \/>\nfont-family: Simsun;<br \/>\nsrc:url(&#8220;\/usr\/share\/fonts\/windows\/FZSongS_20100603.TTF&#8221;)<br \/>\n}<br \/>\nbody{<br \/>\nfont-family: Simsun;<br \/>\n}<br \/>\n&lt;\/style&gt;<\/p><\/blockquote>\n<p>\u5b57\u4f53\u6765\u81eawps\u5e26\u7684\u65b9\u6b63\u5b8b\u4f53\uff0c\u4f7f\u7528Windows\u7684Simsun.ttc\u4e0d\u7ba1\u662f\u5426\u89e3\u5305\u4e3attf\u90fd\u53d1\u73b0\u53ea\u662f\u663e\u793a\u7a7a\u767d\uff0c\u5f88\u5947\u602a\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4e0b\u9762\u9644\u5e26\u8f6c\u8f7d\u7684@font-face\u7684\u7528\u6cd5\uff1a<\/p>\n<p><strong>@Font-face\u57fa\u672c\u4ecb\u7ecd\uff1a<\/strong><\/p>\n<p>@font-face \u662f\u4e00\u4e2acss2\u7684\u4e00\u4e2a\u8bed\u6cd5\uff0c\u5b83\u5141\u8bb8\u4f60\u5728\u7f51\u9875\u4e0a\u663e\u793a\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u5b57\u4f53\u3002\u5373\u4f7f\u5ba2\u6237\u673a\u5668\u4e0a\u53ef\u4ee5\u6ca1\u6709\u5b89\u88c5\u8fd9\u79cd\u5b57\u4f53\uff0c\u7f51\u9875\u4e5f\u53ef\u4ee5\u663e\u793a\u3002<\/p>\n<p>\u672c\u6587\u5c06\u4ecb\u7ecd@font-face\u7684\u57fa\u672c\u7528\u6cd5\uff0c\u4ee5\u53ca\u5728\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u80fd\u4f7f\u7528\u7684\u65b9\u6cd5\u3002<\/p>\n<p><strong>@Font-face\u57fa\u672c\u8bed\u6cd5\uff1a<\/strong><\/p>\n<p>@font-face { font-family: &lt;a-remote-font-name&gt;; src: &lt;source&gt; [,&lt;source&gt;]*; [font-weight: &lt;weight&gt;]; [font-style: &lt;style&gt;]; }<\/p>\n<p>\u5177\u4f53\u4ecb\u7ecd\u8bf7\u79fb\u6b65\u5230\u8fd9\u91cc\uff1ahttps:\/\/developer.mozilla.org\/en\/css\/@font-face<\/p>\n<p>\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<p>@font-face { font-family: MyHelvetica; src: local(&#8220;Helvetica Neue Bold&#8221;), local(&#8220;HelveticaNeue-Bold&#8221;), url(MgOpenModernaBold.ttf); font-weight: bold; }<\/p>\n<p>font-family\u662f\u5b57\u4f53\u7684\u540d\u79f0\uff0csrc\u662f\u5b57\u4f53\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u5ba2\u6237\u672c\u673a\u5b57\u4f53\uff0c\u4e5f\u53ef\u4ee5\u662f\u670d\u52a1\u5668\u4e0a\u7684\u5b57\u4f53\u3002<\/p>\n<p><strong>@Font-face\u76ee\u524d\u6d4f\u89c8\u5668\u7684\u517c\u5bb9\u6027\uff1a<\/strong><\/p>\n<p>\u2022Webkit\/Safari(3.2+)\uff1aTrueType\/OpenType TT (.ttf) \u3001OpenType PS (.otf)\uff1b<br \/>\n\u2022Opera (10+)\uff1a TrueType\/OpenType TT (.ttf) \u3001 OpenType PS (.otf) \u3001 SVG (.svg)\uff1b<br \/>\n\u2022Internet Explorer\uff1a \u81eaie4\u5f00\u59cb\uff0c\u652f\u6301EOT\u683c\u5f0f\u7684\u5b57\u4f53\u6587\u4ef6\uff1bie9\u652f\u6301WOFF\uff1b<br \/>\n\u2022Firefox(3.5+)\uff1a TrueType\/OpenType TT (.ttf)\u3001 OpenType PS (.otf)\u3001 WOFF (since Firefox 3.6)<br \/>\n\u2022Google Chrome\uff1aTrueType\/OpenType TT (.ttf)\u3001OpenType PS (.otf)\u3001WOFF since version 6<br \/>\n\u7531\u4e0a\u9762\u53ef\u4ee5\u5f97\u51fa\uff1a.eot + .ttf \/.otf + svg + woff = \u6240\u6709\u6d4f\u89c8\u5668\u7684\u5b8c\u7f8e\u652f\u6301\u3002<\/p>\n<p><strong>@Font-face \u8ba9\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u517c\u5bb9\u7684\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u6709\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e@font-face \u7684\u5b57\u4f53\u7f51\u7ad9\uff1ahttp:\/\/www.fontsquirrel.com\/fontface\/generator<\/p>\n<p>fontsquirrel \u7f51\u7ad9\u63d0\u4f9b\u4e86\u4e00\u4e2a\u514d\u8d39\u7684 @font-face Kit Generator\u5de5\u5177\uff0c\u53ef\u4ee5\u751f\u6210\u4e0d\u540c\u7684\u5b57\u4f53\u683c\u5f0f\uff0c\u5e76\u4e14\u76f4\u63a5\u7528css\u548chtml\u7ed9\u51fademo\u3002\u4f7f\u4f60\u53ef\u4ee5\u76f4\u63a5\u5f15\u7528\u5230\u4f60\u7684\u7f51\u7ad9\u4e0a\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 fontsquirrel \u7f51\u7ad9\u63d0\u4f9b \u7684\u4e00\u4e9b\u5b57\u4f53\uff0c\u4e5f\u53ef\u4ee5\u4e0a\u4f20\u4f60\u81ea\u5df1\u7684\u5b57\u4f53\u8fd8\u662f\u7528\u3002<\/p>\n<p>@font-face Kit Generator demo<br \/>\nhttp:\/\/www.xunzou.com\/demo\/font-face\/Chopin-Script-fontfacekit\/demo.html<br \/>\n@font-face Kit Generator demo<br \/>\nhttp:\/\/www.font2web.com\/<\/p>\n<p>@font-face demo<br \/>\nhttp:\/\/www.xunzou.com\/demo\/font-face\/font-face.html<\/p>\n<p><strong>\u5176\u5b83font\u670d\u52a1\uff1a<\/strong><br \/>\nGoogle font API\uff0c\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u5b57\u4f53\u670d\u52a1\uff0c\u53e6\u5916\u4e00\u4e9b\u5b57\u4f53\u66ff\u6362\u8fd8\u6709cufon\u7b49\u3002<br \/>\nGoogle font API \u53ef\u4ee5\u53c2\u8003\u4e4b\u524d\u7684\u4e00\u7247\u6587\u7ae0\uff1ahttp:\/\/www.xunzou.com\/blog\/post\/619.html<\/p>\n<p>\u8f6c\u8f7d\u81ea\uff1ahttp:\/\/www.jb51.net\/web\/89797.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u76f4\u4f7f\u7528wkhtmltopdf\u6765\u505ahtml\u8f6cpdf\u7684\u5de5\u4f5c\uff0c\u4f46\u662f\u5f88\u5947\u602a\u7684\u53d1\u73b0\uff0c\u5728C &#8230; <a class=\"more-link\" href=\"https:\/\/actom.me\/blog\/font-face-%e8%a7%a3%e5%86%b3wkhtmltopdf%e7%9a%84%e4%b8%ad%e6%96%87%e6%98%be%e7%a4%ba%e9%97%ae%e9%a2%98.html\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,4],"tags":[],"_links":{"self":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/895"}],"collection":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":2,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"predecessor-version":[{"id":897,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions\/897"}],"wp:attachment":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}