【发布时间】:2014-09-01 14:19:16
【问题描述】:
我已经在 windows 中安装了新字体,现在我想在我的 web 中使用该字体作为自定义字体。在下图中,它将描述我的所有问题http://i.imgur.com/hkbfA6O.png
这是我的代码
<html>
<head>
<meta charset='uft-8' />
<style type="text/css">
@font-face {
font-family: urdu;
src: url(font/urdu/NOORIN01.TTF);
}
@font-face {
font-family: eng;
src: url(font/sansation_light.woff);
}
body{
font-size:30px;
}
.urdu{font-family:'urdu';}
.eng{font-family:'eng';}
</style>
</head>
<body>
<div class='urdu'>میں نے آپ کے مسئلے کو قتل کرنے جا رہا ہوں</div>
<div>میں نے آپ کے مسئلے کو قتل کرنے جا رہا ہوں</div>
<div class="eng">The quick and brown fox jump over the lazy dog.</div>
</body>
</html>
这里是字体文件
http://speedy.sh/WdxpP/sansation-light.woff
http://speedy.sh/wEzZ6/NOORIN01.TTF
【问题讨论】:
-
您的检查员是否将该文件显示为 200 正常还是有错误?
-
font/urdu/NOORIN01.TTF 路径很好,没有错误。我认为编码问题等
-
我已经提供了代码和字体,所以专家可以自己测试。
-
你有 'uft-8' 作为你的字符集。应该是 UTF-8
-
我猜在 html 中它并不重要,因为它不敏感。但是我也检查过了,它并没有解决问题
标签: css encoding fonts font-face custom-font