我@font-face
为字体Rajdhani使用了CSS规则。在台式机上完美运行,但在Android和IOS设备上却不行:
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-light.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-medium.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-regular.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-semibold.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-bold.ttf") format("truetype"),
}
您还应该添加其他格式的文件,例如,转到在线Web字体生成器并转换字体,然后添加所有类型,因为这与操作系统有关
@font-face {
font-family: "CustomFont";
src: url("CustomFont.eot");
src: url("CustomFont.woff") format("woff"),
url("CustomFont.otf") format("opentype"),
url("CustomFont.svg#filename") format("svg");
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句