To insert code in a forum thread or comment wrap it in code tags : <code>...</code>.
Relative link to fontface in css breaks when using minify/cdn
  • Hi Kaptin & Team,

    Firstly, big thanks for an excellent theme.

    I am using fontface and all works well when all files are on my main server in their original form.

    However, when I use minify and a cdn, fontface breaks. The reason seems to be (as far as I understand) that the Striking CSS uses a relative link to the fontface files, and this link is not pointing the right location once the css is moved/edited through minification / cdn mirroring. I am serving visitors from Australia and Sweden, and wanted to host some resources on a CDN close to my visitors. I ended up first making the jss and css files smaller with minify, and then mirroring them with a cdn that has edge servers in both .se and .au. (Complete overkill for such a small site, but lots of geek fun to set up.) Doing this broke my fancy fontface font, though.

    Therefore, may I please suggest that you consider changing the Striking-generated link to the fontface files by editing line 27 in framework/functions/skin.php to hard-link the font files?

    For users who have had the same problems, my ugly edit on my install is as follows. Obviously, my domain in this case is, you should use your own...

    $fontface_css .= preg_replace("/url\s*\(\s*['|\"]\s*/is","\\0../fontfaces/$font_info[0]/",$match[0])."\n";

    $fontface_css .= preg_replace("/url\s*\(\s*['|\"]\s*/is","\\0$font_info[0]/",$match[0])."\n";

This discussion has been closed.
All Discussions