title: How to use font-face in xamarin UWP
body: <p>I am working on cross platform app. In webview I want to use @font-face. It is working fine on Android but not working on UWP. My font file is in Assets/Fonts folder and in style sheet I am using the below code:</p>
  
  <pre><code>@font-face {
      font-family: 'defont';
      src: url('Assets/Fonts/mher.ttf');
  }
  </code></pre>
  
  <p>In Android I was using this:</p>
  
  <pre><code>src: url('file:///android_asset/mher.ttf');    
  </code></pre>
  
  <p>But when same approach I try in UWP, it is not working.
  Please anyone has any idea?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Below is my C# code of using normal WebView. I am getting html content from local html file, replace some placeholders and display new html string to WebView.</p>
  
  <pre><code>var browser = new WebView();
  var htmlSource = new HtmlWebViewSource();
  
  var assembly = IntrospectionExtensions.GetTypeInfo(typeof(WebViewPage)).Assembly;
  Stream stream = assembly.GetManifestResourceStream("MyApp.Assets.MyTemplate.html");
  
  string templateHtml = "";
  using (var reader = new StreamReader(stream))
  {
      templateHtml = reader.ReadToEnd();
  }
  
  templateHtml = templateHtml.Replace("{pageHeading}", _post.Title);
  templateHtml = templateHtml.Replace("{body}", _post.Content);
  if (_post.IsFeaturedImageAvailable)
  {
      templateHtml = templateHtml.Replace("{imgSrc}", _post.FeaturedImageUrl);
  }else
  {
      templateHtml = templateHtml.Replace("{imgSrc}", "");
  }
  templateHtml = templateHtml.Replace("pdfprnt-buttons", "pdfprnt-buttons hide");
  
  htmlSource.Html = templateHtml;
  htmlSource.BaseUrl = DependencyService.Get&lt;IBaseUrl&gt;().Get();
  browser.Source = htmlSource;
  Content = browser;
  </code></pre>