【发布时间】:2011-10-13 23:20:25
【问题描述】:
我正在开发一个网站,目前正在使用@font-face 技术 (this + this) 来加载字体。 我注意到一些特殊字符没有正确加载 -> ŠĐŽČĆ šđžčć。 也就是说,这些字符存在于字体本身中。 所以,我做了一个测试... 我用@font-face 字体和cufon 字体加载了一个测试页面...... 结果如下 ->
当然,这里是代码 ->
<html>
<head>
<script type="text/javascript" src="cufon-yui.js"></script>
<script type="text/javascript" src="ReprobateCRO_400.font.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<script type="text/javascript">Cufon.set('fontFamily', 'ReprobateCRO').replace('h1');</script>
<style type="text/css">
@font-face {
font-family: 'ReprobateCROLASTRegular';
src: url('reprob_cro_last_last-webfont.eot');
src: local('ReprobateCROLASTRegular'),
url('reprob_cro_last_last-webfont.eot?#iefix') format('embedded-opentype'),
url('reprob_cro_last_last-webfont.woff') format('woff'),
url('reprob_cro_last_last-webfont.ttf') format('truetype'),
url('reprob_cro_last_last-webfont.svg#ReprobateCROLASTRegular') format('svg');
font-weight: normal;
font-style: normal;
}
h2{
font-family:ReprobateCROLASTRegular;
}
</style>
</head>
<body>
<h1>--> CUFON --> šđžčć ŠĐŽČĆ</h1>
<br/><br/>
<h2>--> @FONT-FACE --> šđžčć ŠĐŽČĆ</h2>
</body>
</html>
到目前为止,我已经尝试从 utf8、widnwos1250 切换编码,但似乎没有任何东西可以与 @font-face 技术配合使用...
所以,我有两个问题...有人知道这里发生了什么吗?而且,如果我切换到使用 @font-face 的 cufon insted - 这会减慢页面加载速度吗? (考虑cufon使用JS加载字体)
感谢您的宝贵时间!
【问题讨论】:
-
我一定遗漏了一些东西,但它看起来对我来说是正确的......
-
@Andrej 你用的是什么浏览器?
-
@font-face 特殊字符在所有现代浏览器中都被弄乱了。在 chrome、firefox、IE > 7、opera、safari 中测试...在任何地方看起来都一样...
-
到目前为止,我认为这是@font-face 生成器的问题.. 它似乎没有呈现特殊字符...
-
找到了一个修复方法,但我无法将其发布为 anwser……它是字体生成器……我没有明确检查是否制作特殊字符……所以要解决这个问题,转到字体生成器,检查专家设置>>子集>>自定义子集>>选择您的语言...和..中提琴!
标签: html css fonts font-face cufon