munee
munee copied to clipboard
Font encoding
I had a quick look but I didn't see anyone else mention it. Are there any plans to support ttf and other font files in the future?
For example font-awesome will load fine, but the console will fill up with a bunch of errors similar to:
Failed to decode downloaded font: http://example.com/munee.php?files=/\/assets/css/fonts/font-awesome/fontawesome-webfont.ttf&v=4.4.0
I've fixed it by putting font-awesome outside off the main file chain but it would great if this was possible.
I have embedded fonts "src: url(data:font/woff;charset=utf-8;base64,......)" and that is worse. I have done the same thing Crecket has done (made a separate fonts.css) How can I disable the CSS parser from auto-rewriting url()s ?
Okay, modified https://github.com/meenie/munee/blob/e6896ab7067b920821e310cf637caea5a6e09af9/src/Munee/Asset/Type/Css.php#L224 to exclude "data:font" too. Thanks for the pointer @meenie
Fonts should definitley not be run through Munee. Is the issue you are having that you are not using the .htaccess
url rewrite and Munee is rewriting the font URLs in your CSS to http://example.com/munee.php?files=...
? That's a bug if that's the case.
@Crecket: It looks like this is related to #88 which I have yet to fix. Sorry about that ><
@meenie no worries, Munee is still incredibly useful and the site will work just fine with 2 external files instead of 1 :p
Ill have a look if I can fix it myself this week. I had a quick look at how it is setup, would it be viable to just add a new file type which only returns the file?
I'm pretty sure I've solved it right now. The only issue right now is that I'm not sure if the headers are correct for the font files (http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)