How to remove google font in WordPress for only single page?

This code filters all style url’s. It returns the url if there is no reference to google fonts. It returns ‘false’ if there is a reference. What you want is to change the condition. It should only return false if there is a reference and you are on a certain page. Logically, this is equivalent to returning the url if there is no reference or you are not on that page. Like this:

if ((strpos($href, "//fonts.googleapis.com/") === false) || !is_page(12345)) {

Where you should replace 12345 with the ID or slug of the page you want to exclude.