我正在开发一个使用 UIWebView 加载 xhtml 文件的 iPhone 应用程序,该 html 文件可能包含使用自定义字体的 css 文件,但看起来 web 视图不支持自定义字体,因为它不呈现自定义字体在 css 文件中
示例:xhtml 文件:
<head>
<link href="../Styles/p1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p class="line1">تجريب</p>
</body>
</html>
css 文件:
@font-face {
font-family: "AHRAM";
font-style: normal;
font-weight: bold;
src:url("../Fonts/andlso.ttf");
}
p.line1 {
font-family: "AHRAM";
}
有什么建议吗?提前谢谢:)