2016-04-19 30 views
0

我有幾個谷歌字體,我使用@ import規則導入到樣式表。除了Roboto Condensed以外,他們都很好。它回落到默認的無襯線字體,在我的情況下Helvetica。Roboto壓縮谷歌字體落在所有瀏覽器

@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400&subset=latin,latin-ext); 

font-family: 'Roboto Condensed', sans-serif; 
font-style: normal; 
font-weight: 400; 

我已經試圖消除當地的Roboto字體,改變字體重量和字體風格,字體家族的名字,但開發工具打仍然顯示渲染字體是黑體。其他Google字體呈現得很好。什麼可能是一個問題?

回答

1

包括@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400&subset=latin,latin-ext);在我的樣式表和

html, body { 
    font-family: 'Roboto Condensed', sans-serif; 
    font-style: normal; 
    font-weight: 400; 
} 

工作對我蠻好。你的控制檯有任何錯誤嗎?

+0

沒有其他錯誤。它不適用於Chrome,FF或Safari。兩個其他谷歌字體加載正常。 – Daria

+2

計算出它只有在通過鏈接標記(「標準」方式)添加到頭部時才起作用。奇怪的是,這個問題只存在於Roboto Condensed,而其他谷歌字體在使用@import添加時正常工作。 – Daria