如果你使用Safari瀏覽器,我發現在網絡上此解決方案:
那麼事實證明我沒有解決這個問題,至少到目前爲止在Mac上。這就是:創造webkits的CSS 使用「和」周圍的URL這似乎托住東西產生
字體松鼠和字體登記他們還 設置所有的權重和樣式正常這似乎也。到發泄 破壞
這裏是由字體松鼠爲 拉託的面的2產生的代碼:
@font-face {
font-family: 'LatoBlackItalic';
src: url('Lato-BlackItalic-webfont.eot');
src: url('Lato-BlackItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('Lato-BlackItalic-webfont.woff') format('woff'),
url('Lato-BlackItalic-webfont.ttf') format('truetype'),
url('Lato-BlackItalic-webfont.svg#LatoBlackItalic') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'LatoBlack';
src: url('Lato-Black-webfont.eot');
src: url('Lato-Black-webfont.eot?#iefix') format('embedded-opentype'),
url('Lato-Black-webfont.woff') format('woff'),
url('Lato-Black-webfont.ttf') format('truetype'),
url('Lato-Black-webfont.svg#LatoBlack') format('svg');
font-weight: normal;
font-style: normal;
}
以下是我改成了實際工作中的Safari和Chrome 和Firefox:
@font-face {
font-family: Lato;
src: url(../../fonts/Lato-BlackItalic-webfont.eot);
src: url(../../fonts/Lato-BlackItalic-webfont.eot?#iefix) format(embedded-opentype),
url(../../fonts/Lato-BlackItalic-webfont.woff) format(woff),
url(../../fonts/Lato-BlackItalic-webfont.ttf) format(truetype),
url(../../fonts/Lato-BlackItalic-webfont.svg#LatoBlackItalic) format(svg);
font-weight: 900;
font-style: italic;
}
@font-face {
font-family: Lato;
src: url(../../fonts/Lato-Black-webfont.eot);
src: url(../../fonts/Lato-Black-webfont.eot?#iefix) format(embedded-opentype),
url(../../fonts/Lato-Black-webfont.woff) format(woff),
url(../../fonts/Lato-Black-webfont.ttf) format(truetype),
url(../../fonts/Lato-Black-webfont.svg#LatoBlack) format(svg);
font-weight: 900;
font-style: normal;
}
鏈接是在這裏:http://css-tricks.com/forums/discussion/10797/font-face-not-working-in-only-safari-/p1
希望這有助於。
您在Mac上使用哪種瀏覽器? –
你確定這是:''http://:/''? – 2012-10-28 13:32:57
我正在使用Safari。我不確定http://但我正在嘗試。我嘗試了reno提出的解決方案,但safari似乎無法找到建議的字體文件並渲染一個通常的文件。這個問題只在所有瀏覽器上的MAC上,因爲Windows上的Safari瀏覽器完美無缺......問題必須與路徑一致,因爲我在Mac上的Firefox中看到系統也呈現另一種字體樣式,而不是ChollaSans。 – user1780780