我正在为我的客户构建一个使用 Times New Roman 字体的网站。
除 Android 设备(手机、平板电脑)外,一切似乎都运行良好。 Android 没有可用的 Times New Roman 字体。据我所知,您只能使用 Droid Serif 字体,它的外观与 Times 不同。除此之外,字体大小也不同并导致很多对齐问题。
有什么方法可以使用 Times New Roman for Android 吗?我知道 fontface,但没有任何可用于 Times New Roman 的免费网络字体。也许有一个(可接受的)等价物?
提前致谢!
最佳答案
CSS
@font-face {
font-family: 'Times New Roman';
src: url(LiberationSerif-Regular.ttf) format('truetype');
}
@font-face {
font-family: 'Times New Roman';
src: url(LiberationSerif-Italic.ttf) format('truetype');
font-style: italic;
}
@font-face {
font-family: 'Times New Roman';
src: url(LiberationSerif-Bold.ttf) format('truetype');
font-weight: bold;
}
@font-face {
font-family: 'Times New Roman';
src: url(LiberationSerif-BoldItalic.ttf) format('truetype');
font-style: italic;
font-weight: bold;
}
Download the Liberation Serif .ttf font ,解压缩并将文件移动到 webroot。 您可以更改@font-face 源网址并将字体移动到任何您想要的位置。
关于android - Android 设备上的 Times New Roman,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19447990/