Winrt/Metro App. Custom font in a WebView RRS feed

  • Question

  • Does anyone know how to load custom fonts in a WebView?
    What I have tried:

    @font-face {
         font-family: 'Gloria Hallelujah';
         font-style: normal;
         font-weight: 400;
         src: url(Gloria.woff);

    According http://blogs.msdn.com/b/wsdevsol/archive/2012/10/23/about-webview-and-embedded-fonts.aspx.

    But the thing is, that this works ONLY when we call WebView.Navigate(urlToHtmlDocWithCustomFonts);
    But in my case I'm calling WebView.NavigateToString(htmlStringWithCustomFonts); and in this case custom fonts don't works!

    Here is the project with sources from that tuto in case if you want to reproduce: http://www.mediafire.com/download/g2yd7pxa2x5us8n/UsingFonts.zip.

    So my question is, is it possible to load a html string into a webview with custom fonts?

    Friday, December 12, 2014 11:00 AM


All replies