如何使用自定义字体创建 webview。 Webview 加载外部链接(“www.example.com”)。显示此站点 在我的 android 应用程序中使用自定义字体。
感谢大家的回答。
最佳答案
把你的ttf文件放到Asset里 试试这个
<html>
<head>
<style type="text/css">
@font-face {
font-family: typeface;
src: url("file:///android_asset/fonts/typeface.otf")
}
body {
font-family: typeface;
font-size: medium;
}
</style>
</head>
<body>
</body>
</html>
关于android - Android应用程序中webview中的自定义字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34960495/