Dim FontFile As String = "vermidirouge 1.0.ttf"
Dim s As String = $"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0" />
<style>
@font-face
{
Font-family: 'VermidiRouge';
src: local('VermidiRouge'),url('${FontFile}') format('opentype');
}
</style>
</head>
<body>
<h1 style="font-family:VermidiRouge">This label uses a custom Font and it is inside WebView</h1>
</body>
</html>
"$
File.WriteString(xui.DefaultFolder, "test.html", s)
If File.Exists(xui.DefaultFolder, FontFile) = False Then
File.Copy(File.DirAssets, FontFile, xui.DefaultFolder, FontFile)
End If
WebView1.LoadUrl("file://" & File.Combine(xui.DefaultFolder, "test.html"))