本文介绍了西里尔字符使用@ font-face时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



祝所有人能够帮助我解决这个问题!



fontsquirrel stylesheet.css文件:

pre
$ 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')格式('woff'),$格式('truetype'),
url('caviardreams_no_latin-webfont.svg#caviar_dreamsregular')格式('svg');
font-weight:normal;
font-style:normal;

$ b

部分style.css:

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


解决方案

=http://www.fontsquirrel.com/tools/webfont-generator =noreferrer> FontSquirrel Webfont Generator ,您需要检查单选按钮专家,然后选择要支持的语言或代码范围。默认情况下,只包含西方语言中使用的字符。


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;
}
解决方案

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.

这篇关于西里尔字符使用@ font-face时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 23:37