4

I am creating an application in VB.Net and am using a Web browser control to open a website. I have specific fonts on the website that works fine in IE, Chrome, Firefox and safari. However the fonts are not rendered properly when using the Web browser control. Any suggestions why and what setting I need to change in order to make this work?

Cheers.

Update: Basically I noticed that this happens only on my Virtual Machine Windows Server 2012. I exported the project and ran it on my local machine and the fonts are working as expected after setting the Feature Browser Emulation. So I'm not sure if it is to do with some setting on the Virtual Machine.

Neophile
  • 5,132
  • 14
  • 48
  • 99
  • Is the text showing in the wrong font, or does something else go wrong? Do you get mojibake? – Mr Lister May 09 '16 at 19:45
  • Try this question (easily convertible to VB.NET): http://stackoverflow.com/q/17922308/3740093 – Visual Vincent May 09 '16 at 19:45
  • So I just have to set the browser emulation mode technically? – Neophile May 09 '16 at 20:30
  • I don't know for sure. But if you say it works in the normal IE application, then I'd say not using the latest emulation could be a cause. – Visual Vincent May 09 '16 at 21:46
  • Yes that's what I was thinking. Its quite strange though because I do have the Browser Emulation code already in place that handles IE version on the web browser control. Any suggestions on how I can get to know what IE emulation version it is using? – Neophile May 10 '16 at 08:09
  • I did try this but this did not work for me. The emulation mode is set correctly to 11001 i.e. IE 11 Edge. Not sure if I can do more to fix this? – Neophile May 13 '16 at 15:04
  • Hello, I have done this but it still isn't working properly. Any suggestions please? – Neophile May 24 '16 at 14:57

1 Answers1

5

I successfully managed to find the issue and resolve it. It was to do with a setting under the Internet Explorer “Advanced Settings” options. There was a checkbox for “Do not save encrypted pages to disk” that needed to be unchecked for the fonts to work. I was easily able to set the checkbox value using the registry key “DisableCachingOfSSLPages” that is found under:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

After setting this, all the fonts come back to life:). Posting my answer here and hope this helps others.

Neophile
  • 5,132
  • 14
  • 48
  • 99
  • this is amazing. If like me, this probably only occurred when running https. But I don't get why it worked in IE but not from the webbrowser control. But does that prevent a security issue for other encrypted pages? – Garr Godfrey Jul 06 '17 at 21:03