CSS:在单个字体系列中导入自定义字体样式

时间:2015-12-11 20:17:36

标签: css fonts font-face webfonts

我想在我的项目中使用不同风格/重量的某种字体来表示粗体,斜体等。不同的样式应属于一个特定的字体系列" share"。

所以我提出了这个CSS:

font-face {
font-family: 'share';
src: url('share-regular.eot');
src: url('share-regular.eot?#iefix') format('embedded-opentype'),
     url('share-regular.woff') format('woff'),
     url('share-regular.ttf') format('truetype'),
     url('share-regular.svg') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'share';
src: url('share-bold.eot');
src: url('share-bold.eot?#iefix') format('embedded-opentype'),
     url('share-bold.woff') format('woff'),
     url('share-bold.ttf') format('truetype'),
     url('share-bold.svg') format('svg');
font-weight: bold;
}
@font-face {
font-family: 'share';
src: url('share-italic.eot');
src: url('share-italic.eot?#iefix') format('embedded-opentype'),
     url('share-italic.woff') format('woff'),
     url('share-italic.ttf') format('truetype'),
     url('share-italic.svg') format('svg');
font-style: italic;
}

(还有一个等宽变体,但我把它放到另一个家庭" share-mono"现在。)

但这并不适用于" italic"。我不确定"大胆":它看起来不错,但它可能只是"常规"加粗而不是使用特定的份额 - 粗体。

所以我想知道是否有可能实现我想做的事情,如果是的话,我的错误在哪里?

提前致谢! 亨德里克

0 个答案:

没有答案
相关问题