Disable font install popup in WebView on macOS

Hello,

we have some code that uses the deprecated WebView class to load some HTML content. When we attempt to load e.g. this page https://jovial-mclean-ae8f9b.netlify.app/ several popups about fonts requiring install will appear. Is there a way how to configure WebView so it does not show these popups?

The same page loads without the popups using WKWebView. Unfortunately we are unable to rewrite everything to WKWebView yet as it is not that trivial for the amount of code in both native and JS that we have. So I would be very interested in a some quick fix for the WebView that I might have missed.

Thank you for any help,

Jakub

Have you the list of required fonts ? Could you add them as resources in your app ?

WebView is deprecated since 10.14. You will run in more and more problems if you keep using. Sooner or later it will even crash. So it should be time to start the change.

Follow Apple's recommendation:

In apps that run in OS X 10.10 and later, use the WKWebView class instead of using WebView.

Thank you for your suggestion.

That idea did cross our minds, but it is not easy to implement.

The responsible JS code that makes use of the fonts is delivered by 3rd party. Thats what makes it difficult to transition to WKWebView and also to maintain the list of fonts as part of our app as it can change without us knowing.

A second reason against this solution is the increase of application size as some fonts have 10MB.

Thats why I am first trying to figure out whether there is an option to supress the popups and make it behave as WKWebView in this regard.

Disable font install popup in WebView on macOS
 
 
Q