Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Jesse Paria
Minify problem with Google Fonts
13 ottobre 2011 11.30
Risposta

Jesse Paria

Punteggio: Junior Member

Messaggi: 69

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

Hello,

I am adding google fonts to one of the themes that I am developing. I added the fonts through the @font-face css selector
1@import url(http://fonts.googleapis.com/css?family=Nobile:400,700);


Everything works fine until minification is turned on and then evidently the URL is changed and the server can no longer find the resource. It seems to throw a 500 internal error. The server looks in the theme/css folder for it instead of looking for an external resources. From the error, it seems that minifier is removing one of the "/" from the HTTP://

You can see part of the error below
css/http:/fonts.googleapis.com/css?family=Nobile:400,700 (No such file or directory)


I am sure I could probably load the resources with Javascript but that just doesn't seem "clean" as then you are using javascript to deal with styling. This is what css is for.

Has anyone run into this same problem?

Thanks in advance
Jesse Paria
RE: Minify problem with Google Fonts
3 novembre 2011 13.43
Risposta

Jesse Paria

Punteggio: Junior Member

Messaggi: 69

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

An update: I found no way around this error. The minify for some reason would rewrite the css so that it was looking for the file in the CSS folder instead of through HTTP

The only way I could fix this is by adding the link through the <link href="http://fonts.googleapis.com/css?family=Nobile:400,700"> into the template_normal.vm or by adding it via javascript.

Hope this save people time! Anyone else have a css based solution I would love to hear it.
Joerg Viola
RE: Minify problem with Google Fonts
25 aprile 2013 12.09
Risposta

Joerg Viola

Punteggio: New Member

Messaggi: 3

Data di Iscrizione: 27 febbraio 2013

Messaggi recenti

Confirmed. Same happens here!