2016-01-23 24 views
1

如何使用自定義字體創建webview。 Webview加載外部鏈接(「www.example.com」)。該網站在我的android應用程序中顯示爲帶有自定義字體的 。在android應用程序的webview中的海關字體

謝謝你的回答。

+0

看:http://stackoverflow.com/questions/3900658/how-to-change-font-face-of-webview-in-安卓 –

回答

1

把你的資產 TTF文件,並嘗試這種

<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> 
相關問題