Cyrillic characters trouble using @font-face

左心房为你撑大大i 提交于 2019-12-11 00:11:22

问题


I've finished with psd and used Caviar Dreams font in my project. This font contains cyrillic characters and they appear in photoshop, but when I use the same font with @font-face (font squirrel webfont generator) - all cyrillic characters appear as generic font characters (arial for example). Latin characters appear properly.

All the best wishes to somebody who can help me with this problem!

fontsquirrel stylesheet.css file:

@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;

}

part of my style.css:

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

回答1:


When using the FontSquirrel Webfont Generator, you need to check the radio button “EXPERT” and then select the languages to be supported or the code range. The default is that only characters used in “Western languages” are included.




回答2:


Take a look here.

Special watch your meta tag, should be like this <meta http-equiv="content-type" content="text/html;charset=utf-8" />




回答3:


See manual for including Cyrillic charset: http://php-junior.ru/web-devel/vstraivaem-shrifty-pri-pomoshhi-font-squirrel-font-face-generator



来源:https://stackoverflow.com/questions/18471502/cyrillic-characters-trouble-using-font-face

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!