Support » Plugin: Self-Hosted Google Fonts » Seems to not work for me

  • Resolved mlampariello

    (@mlampariello)


    Hi,

    i was desperately looking for an easy way to selfhost the google fonts and I was happy to find your plugin. But it doesn’t seem to work on our site.
    I had autoptimize activated first, cleared all the caches (browser & autoptimize), tried it several times with pingdom and in the console of Chrome. Even after deactivating autoptimize it still loads the font from google.

    Deactivating google fonts with autoptimize didn’t work for me because after the menu was a different font and looked messed up.

    we are using:
    – yootheme wit widgetkit

    Could you please have a look. Thanks in advance.

    kind regards

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author asadkn

    (@asadkn)

    Hey,

    Looks like the theme you’re using uses @import in a non-standard way. The correct way is to use it as follows:

    @import url('...'); but the theme in use is using it without url(). It still works in most browsers but your theme author should change it to follow standards.

    Anyways, you can make it work by changing the line 167 in file sgf-pro/inc/process-css.php to this:

    preg_match_all('#@import \s+ (?:url\()? \s*([\"\']?|\s+) ([^"\'\s\)]*) (?:\1|\s+|\))[^;]*;#six', $content, $imports);

    Clear all plugins cache and browser cache afterwards.

    Thread Starter mlampariello

    (@mlampariello)

    Hi,

    thanks for your fast reply and the detailed explanation.
    It works like a charm.

    But the fix will be lost with your next update right? Or will you include it into the next version?

    Cheers from Germany

    Plugin Author asadkn

    (@asadkn)

    Good to hear it worked. Yes I will include it in the next version after some more testing.

    Cheers.

    Thread Starter mlampariello

    (@mlampariello)

    Perfect..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Seems to not work for me’ is closed to new replies.