has anyone come across an issue when Client Dependency is turned on that @font-face fonts aren't served correctly? When I turn Client Dependency off (<compilation debug="true">) the font is served correctly.
Looking in the Firebug Net Tab it tries to retrieve the font from the following URL "{My Site URL}/fonts/babasneue/bebasneue-webfont.woff%27)%20format(%27woff" and it gets a 404 not found and goes to my fallback font. While if I turn it off it retrieves it correctly from "{My Site URL}/fonts/babasneue/bebasneue-webfont.woff" and the font is shown correctly.
From looking at the CSS generated by the Client Dependency Framework it seems to be grabbing the whole of the url/format declaration and wrapping all of it as a url. So url("/fonts/babasneue/bebasneue-webfont.woff") format ("woff"), comes out in the generated CSS as url("http://localhost:45560/fonts/babasneue/bebasneue-webfont.woff%27)%20format(%27woff") instead of a url() and a format(). It seems the regular expression to determine the url is screwing up.
Any ideas how to fix this without having to resort to pulling this declaration out of my stylesheet completely and putting it somewhere else?
Thanks Shannon, that's good to know. In the end though I've decided to just place the @font-face declaration in a style tag in my Base masterpage as I still want to take advantage of CD's CSS minification. This is working fine.
Everything was ok until latest Firefox update, when it started throwing errors for this lines, so I need to fix it somehow. Putting this to separate .css file would be last resort, as I have quite strict file structure (multiple compiled .less files) and I use this as a Less mixin.
It seems that CDF url-encodes strings, any ideas how to turn this off?
The problem is that the CDF logic for this stuff hasn't kept up with the fast pace of technology. I don't think there is a configuration option to do what you are doing, if you can log a bug at
http://github.com/Shandem/ClientDependency
I'll try to get a patch release out tomorrow - and yes i should have fixed this ages ago!
Client Dependency Framework and @font-face
Hey guys,
has anyone come across an issue when Client Dependency is turned on that @font-face fonts aren't served correctly? When I turn Client Dependency off (<compilation debug="true">) the font is served correctly.
Looking in the Firebug Net Tab it tries to retrieve the font from the following URL "{My Site URL}/fonts/babasneue/bebasneue-webfont.woff%27)%20format(%27woff" and it gets a 404 not found and goes to my fallback font. While if I turn it off it retrieves it correctly from "{My Site URL}/fonts/babasneue/bebasneue-webfont.woff" and the font is shown correctly.
Any ideas?
Thanks,
Pat
Just an update on this, it seems to be the regex that is used to minify the CSS that is causing the problem.
In my CSS I am using the font-face declarations favoured by Paul Irish and generated by Font-Squirrel.
From looking at the CSS generated by the Client Dependency Framework it seems to be grabbing the whole of the url/format declaration and wrapping all of it as a url. So url("/fonts/babasneue/bebasneue-webfont.woff") format ("woff"), comes out in the generated CSS as url("http://localhost:45560/fonts/babasneue/bebasneue-webfont.woff%27)%20format(%27woff") instead of a url() and a format(). It seems the regular expression to determine the url is screwing up.
Any ideas how to fix this without having to resort to pulling this declaration out of my stylesheet completely and putting it somewhere else?
Thanks,
Pat
ClientDependency is CSS2 compliant, not CSS3, you'll have to raise a bug on codeplex - http://clientdependency.codeplex.com
In the mean time I'd put your @font-face delcarations into a separate file which isn't handled by ClientDependency.
Thanks Slace, I was afraid I was going to have to do that. I'll raise an issue for it then. Thanks.
I'm marking this as solved as a workaround was provided.
You can also just turn off css minify, see documentation here:
http://clientdependency.codeplex.com/wikipage?title=Configuration&referringTitle=Documentation
enableCssMinify = false
Thanks Shannon, that's good to know. In the end though I've decided to just place the @font-face declaration in a style tag in my Base masterpage as I still want to take advantage of CD's CSS minification. This is working fine.
As far as I can tell disabling CSS minification does not fix the issue.
Hi,
thread is very old, but I have same problem in Umbraco 6.1.3.
I am using inline svg in my css:
Even with minification turned off it becomes:
Everything was ok until latest Firefox update, when it started throwing errors for this lines, so I need to fix it somehow. Putting this to separate .css file would be last resort, as I have quite strict file structure (multiple compiled .less files) and I use this as a Less mixin.
It seems that CDF url-encodes strings, any ideas how to turn this off?
The problem is that the CDF logic for this stuff hasn't kept up with the fast pace of technology. I don't think there is a configuration option to do what you are doing, if you can log a bug at http://github.com/Shandem/ClientDependency
I'll try to get a patch release out tomorrow - and yes i should have fixed this ages ago!
Thanks Shannon,
I will create an issue on github.
As a workaround I've encoded my svg in base64, this fixes the problem as there are almost no characters that get url encoded:
is working on a reply...