Hello all,
I have an HTML file which uses a certain font.
When I load this in Webview, the Font information is not considered.
The HTML file has the following format.
What should I do to view the HTML page with the correct Font?
I have attached the project as zip file.
You can open the html file in the files folder and see how it looks when the correct font is used.
Regards,
KPS
I have an HTML file which uses a certain font.
When I load this in Webview, the Font information is not considered.
B4A:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#DebuggerForceStandardAssets:True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
WebView1.Loadurl(xui.FileUri(File.DirAssets,"First Aid.html"))
End Sub
The HTML file has the following format.
HTML:
<style type="text/css">
@font-face {
font-family: MyTamilFont;
src: url("Tab_Shakti_2.TTF")
}
body {
font-family: MyTamilFont;
font-size: medium;
color: black
}
</style>
What should I do to view the HTML page with the correct Font?
I have attached the project as zip file.
You can open the html file in the files folder and see how it looks when the correct font is used.
Regards,
KPS