Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #642578

    Hi

    I have gone through numerous threads and cannot seem to find the topic related to my Question,find it quite strange that on one esle picked up on this.

    For some reason Google fonts added through the Functions.php page does not work on mobile phones (ios) and some desktops.

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Oswald’] = ‘Roboto:100,400,600,800’;
    $fonts[‘Roboto Slab’] = ‘Roboto Slab:400,300,700’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Oswald’] = ‘Open Sans:100,300,700’;
    $fonts[‘Roboto Slab’] = ‘Roboto Slab:400,300,700’;
    return $fonts;
    }

    So I tried to enqueue the script as follows but when I inspect the head the “,” separating the font-weight are replaced with % signs.

    function load_fonts() {
    wp_register_style(‘googleFonts’, “https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700,100”, false);
    wp_enqueue_style(‘googleFonts’);
    }
    add_action(‘wp_enqueue_scripts’, ‘load_fonts’);

    in my style.css i would then call the style .something { font-family: ‘Roboto Slab’, serif;}

    Can anyone please assist me in this please

    Regards

    #642697

    Hey Gavin,

    Thanks for getting in touch with us!

    Would you mind providing a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)

    Best regards,
    Jordan

    #644082

    Hi Jordan,

    The link is provided in the private content block.

    I have checked the site again on a colleague’s windows computer (Chrome, Safari, Edge, IE, Firefox) and google fonts and fontAwesome load perfectly fine. When I load the site on my iphone (6+, iOS 9.3.2) however, google fonts, fontAwesome and Fontello don’t load at all. The very strange thing is that when checked on another identical iphone with the exact same specs and software version, it all loads fine.

    The elements in question are all the headings which are supposed to be Roboto (but revert to a serif font on certain computers and my iphone) as well as the social media icons, events calendar icons on the homepage to the bottom and all other icons used at various places across the site.

    This is the first time I have ever come across a bug that is as conditional as this and any help in the matter will be greatly appreciated.

    Best Regards

    #644548

    Hi!

    The very strange thing is that when checked on another identical iphone with the exact same specs and software version, it all loads fine.

    Are you checking this on safari? Is it working if you set it to another font other than “Roboto”?

    Cheers!
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.