簡體   English   中英

@font-face,firefox 和 wordpress

[英]@font-face, firefox and wordpress

我已經構建了一個自定義 wordpress 主題,該主題使用字體進行排版。 在 localhost 中運行時一切正常,但是在將主題上傳到實時站點后,字體在 FF 中失敗。 在 IE9 中仍然可以正常工作

我已經嘗試在 header.php 中對 CSS 鏈接進行硬編碼,將字體文件從主題中移出到站點根目錄,使用單獨的樣式表來處理 @font-face 聲明,但是什么都不想要。

有任何想法嗎?

干杯內森

您是否包含了所有必要的字體文件? 不同的瀏覽器支持不同的類型。 例如,這是我最近在一個網站上使用的一個:

font-face {
font-family: 'GentiumBookBasicRegular';
src: url('_/fonts/GenBkBasR-webfont.eot');
src: url('_/fonts/GenBkBasR-webfont.eot?#iefix') format('embedded-opentype'),
     url('_/fonts/GenBkBasR-webfont.woff') format('woff'),
     url('_/fonts/GenBkBasR-webfont.ttf') format('truetype'),
     url('_/fonts/GenBkBasR-webfont.svg#GentiumBookBasicRegular') format('svg');
font-weight: normal;
font-style: normal;
}

A fantastic resource for this is http://fontsquirrel.com - they'll even let you upload fonts that they don't have and they'll create the package and the css for you.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM