我正在一個項目中使用我正在使用的六種體重/樣式的字體。這些包括:常規,斜體,半粗體,半粗體斜體,粗體和粗體斜體。我有@ font-face標籤設置(理論上)他們應該顯示的方式。但實際情況是,大膽的總是斜體。無論如何要宣佈這些大膽的+斜體權重,以便它們能夠正常工作?我不想在所有地方調用不同的字體名稱。理想情況下,我應該能夠聲明正確的體重和樣式,並獲得正確的字體版本。定義CSS @字體臉部粗體斜體
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-bold-webfont.eot');
src: url('agaramondpro-bold-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-bold-webfont.woff') format('woff'),
url('agaramondpro-bold-webfont.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-bolditalic-webfont.eot');
src: url('agaramondpro-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-bolditalic-webfont.woff') format('woff'),
url('agaramondpro-bolditalic-webfont.ttf') format('truetype');
font-weight: bold;
font-style: italic, oblique;
}
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-italic-webfont.eot');
src: url('agaramondpro-italic-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-italic-webfont.woff') format('woff'),
url('agaramondpro-italic-webfont.ttf') format('truetype');
font-weight: normal;
font-style: italic, oblique;
}
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-regular-webfont.eot');
src: url('agaramondpro-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-regular-webfont.woff') format('woff'),
url('agaramondpro-regular-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-semibold-webfont.eot');
src: url('agaramondpro-semibold-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-semibold-webfont.woff') format('woff'),
url('agaramondpro-semibold-webfont.ttf') format('truetype');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'AdobeGaramondPro';
src: url('agaramondpro-semibolditalic-webfont.eot');
src: url('agaramondpro-semibolditalic-webfont.eot?#iefix') format('embedded-opentype'),
url('agaramondpro-semibolditalic-webfont.woff') format('woff'),
url('agaramondpro-semibolditalic-webfont.ttf') format('truetype');
font-weight: 600;
font-style: italic, oblique;
}
任何想法,使其工作?
其實安東尼,那不是我正在尋找的答案,但它是正確的。在回顧我的photoshop模型時,只有semibold和正常和正常的斜體被使用,所以這個問題已經變得沒有實際意義。我仍然好奇是否有辦法讓所有6種風格都能正常工作。附:它似乎在Safari中正常工作,但不在Chrome中。非常適合共享WebKit引擎。 – user1296965
我弄明白了,你必須按照這個順序列出它們:正常的,正常的斜體,半粗體,半粗體斜體,粗體,粗體斜體。如果你首先設置斜體,那我想在繼承過程中勝出。 – user1296965