I followed your advice and validated the markup and css at w3c
and it passed the validation as an html5 document (and the css also
was fine).
Cleared firefox's cache as well but still it can't execute the @font-
face.

Installed the firebug plugin and from what it seems there's no
error... firefox just doesnt load any @font-face i set at all through
rails.
If i open the (seperate) html file i keep for draft design it works
just fine.

Also i connected to the WEBrick server with my iphone to see if mobile
safari loads it as well and it turns out it doesnt.
So i think i'll skip @font-face and replace it with a png file of that
font to make sure it's universally viewable :-)

On Aug 12, 7:26 pm, Colin Law <[email protected]> wrote:
> On 12 August 2011 17:11, Filippos <[email protected]> wrote:
>
> > I have this strange issue.
>
> > Inside the assets/stylesheets/pages.scss (pages is a controller)
> > i have set up a custom font with font-face
>
> > @font-face {
> >  font-family: myfont;
> >  src: url('../assets/fonts/my_font.otf');
> > }
>
> > and i call it inside an id.
>
> > The thing is that the font loads fine on safari and chrome but it
> > doesnt work on firefox at all.
>
> First I suggest that you view the html source (View > Page Source in
> Firefox) and copy the complete text.  Then paste it into the w3c html
> validator to check the html is valid.  Differences in presentation
> between browsers is often caused by invalid html.
>
> > When i use the exact code on an html file and load it on firefox it
> > works but when i use rails it doesnt.
>
> Have you tried clearing the firefox cache?  If that does not sort it
> then I suggest that it can't be exactly the same, firefox will render
> it the same whether it has come from erb or raw html.  If you just
> mean a snippet of the html then of course we could be back to the
> validity issue.
>
> Finally if still not working try Firebug and see if it shows any errors.
>
> Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to