西里尔字符使用@ font-face时遇到麻烦

时间:2013-08-27 17:03:37

标签: css fonts font-face cyrillic

我已完成psd并在我的项目中使用了Caviar Dreams字体。 这个字体包含西里尔字符,它们出现在photoshop中,但是当我使用与@ font-face(字体squirrel webfont generator)相同的字体时 - 所有西里尔字符都显示为通用字体字符(例如arial)。拉丁字符正确显示。

对能帮助我解决这个问题的人表示最良好的祝愿!

fontsquirrel stylesheet.css文件:

@font-face {
font-family: 'caviar_dreams';
src: url('caviardreams_no_latin-webfont.eot');
src: url('caviardreams_no_latin-webfont.eot?#iefix') format('embedded-opentype'),
     url('caviardreams_no_latin-webfont.woff') format('woff'),
     url('caviardreams_no_latin-webfont.ttf') format('truetype'),
     url('caviardreams_no_latin-webfont.svg#caviar_dreamsregular') format('svg');
font-weight: normal;
font-style: normal;

}

我的style.css的一部分:

h2 { 
font-family: 'caviar_dreams', arial, sans-serif; 
font-size: 26px;
color: #ffffff;
}

3 个答案:

答案 0 :(得分:7)

使用FontSquirrel Webfont Generator时,需要选中单选按钮“EXPERT”,然后选择要支持的语言或代码范围。默认情况下,仅包含“西方语言”中使用的字符。

答案 1 :(得分:0)

看看here

特别关注您的元标记,应该像<meta http-equiv="content-type" content="text/html;charset=utf-8" />

一样

答案 2 :(得分:0)