简体   繁体   English

字体在Web浏览器控件中不起作用

[英]Fonts not working in Web Browser Control

I am creating an application in VB.Net and am using a Web browser control to open a website. 我正在VB.Net中创建一个应用程序,并使用Web浏览器控件来打开一个网站。 I have specific fonts on the website that works fine in IE, Chrome, Firefox and safari. 我在网站上有特定的字体,可以在IE,Chrome,Firefox和Safari中正常使用。 However the fonts are not rendered properly when using the Web browser control. 但是,使用Web浏览器控件时,字体无法正确呈现。 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. 更新:基本上我注意到这只发生在我的虚拟机Windows Server 2012上。我导出项目并在我的本地计算机上运行它,并且在设置功能浏览器仿真后字体按预期工作。 So I'm not sure if it is to do with some setting on the Virtual Machine. 所以我不确定它是否与虚拟机上的某些设置有关。

I successfully managed to find the issue and resolve it. 我成功地找到了问题并解决了它。 It was to do with a setting under the Internet Explorer “ Advanced Settings ” options. 它与Internet Explorer“ 高级设置 ”选项下的设置有关 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: 我可以使用在以下位置找到的注册表项“ DisableCachingOfSSLPages ”轻松设置复选框值:

[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings] [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. 在这里发表我的答案,并希望这有助于其他人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM