Support » Plugin: Pegasaas Accelerator WP » Issue with external font-awesome stylesheet; fonts not loading

  • Resolved disagree

    (@disagree)


    When the font-awesome plugin is active ( https://wordpress.org/plugins/font-awesome/ ), it injects external font-awesome css files and fonts. Once pegasaas optimizes this code, it translates all these links into a !external-css,https format ( something in that sense ), which doesn’t seem to be loaded properly as font files by the browser.

    Original code :

    
    <link rel='stylesheet' id='font-awesome-official-css'  href='https://use.fontawesome.com/releases/v5.9.0/css/all.css' type='text/css' media='all' integrity="sha384-i1LQnF23gykqWXg6jxC2ZbCbUMxyw5gLZY6UiUS98LYV5unm8GWmfkIS6jqJfb4E" crossorigin="anonymous" />
    

    but in the combined.css the font urls change to :

    
    src: url('https://<websiteurl>/wp-content/pegasaas-cache/!/external-css,https:/use.fontawesome.com/releases/v5.9.0/webfonts/fa-brands-400.eot');
    

    This seems to break the font urls, and none of the fonts can be loaded properly. The woff, woff2, ttf, etc all seem to fail.

    Some Chrome console output and request/response ( also note the expires header on the response ) : https://imgur.com/a/qOYzpu6

    My current work-around is to add font-awesome manually to our child theme.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I guess one way to get around this issue would be to be able to exclude css files, paths and/or external hosts from the “combine css” feature.

    Plugin Author Pegasaas

    (@pegasaas)

    The “proxy external css” feature is going to be removed in a future version, as it was only something that was required for minifying and GZIP’ing external files, for PageSpeed Version 4 (prior to November 2018).

    The current scoring system (which is based more on overall speed) does not penalize based upon a single file not being minified or GZIP’d.

    As FontAwesome should be properly encoded and minified already, I would simply turn off the “Proxy External CSS” feature

    Thank you for bringing it to my attention though — I’ll move up the date for the removal of that feature which is no longer required (and hasn’t been properly maintained over the last few releases).

    Kind regards,
    Brandon Devnich
    Pegasaas

    Plugin Author Pegasaas

    (@pegasaas)

    It looks like that feature was already removed from the interface, however there were a couple references in the API that still transformed those CSS files to external URLs.

    While we’ve now just removed that functionality from the combined CSS, we’re still testing to see whether the relative paths to the font files are updated.

    I’ll keep you in the loop testing with the Font Awesome plugin.

    Kind regards,
    Brandon Devnich
    Pegasaas

    Plugin Author Pegasaas

    (@pegasaas)

    We just confirmed that the relative mapping to the .woff/.woff2 files are working correctly with the updated functionality.

    Thank you for your patience while we investigated.

    Kind regards,
    Brandon Devnich
    Pegasaas

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issue with external font-awesome stylesheet; fonts not loading’ is closed to new replies.