Ruby on Rails
Sunday, December 6, 2015
I changed
src: url(/assets/fonts/ufonts.com_metrolis-negro-opentype.otf) format("truetype"); to
src: font-url(/assets/fonts/ufonts.com_metrolis-negro-opentype.otf) format("truetype");
and that got me a syntax error expected ")" was ".otf..."
that error goes away and the page comes back if i put single quotes
src: url('/assets/fonts/ufonts.com_metrolis-negro-opentype.otf') format("truetype");
but the font still doesn't get applied
On Sunday, December 6, 2015 at 3:13:44 PM UTC-5, Colin Law wrote:
-- src: url(/assets/fonts/ufonts.com_
src: font-url(/assets/fonts/ufonts.com_
and that got me a syntax error expected ")" was ".otf..."
that error goes away and the page comes back if i put single quotes
src: url('/assets/fonts/ufonts.com_
but the font still doesn't get applied
On Sunday, December 6, 2015 at 3:13:44 PM UTC-5, Colin Law wrote:
On 6 December 2015 at 20:03, fugee ohu <fuge...@gmail.com> wrote:
> I can't get my fonts to work
>
> Having trouble getting fonts to work I was using Berlin Sans Serif but it
> was working so I tried downloading another font to replace it but that's not
> working either
>
> I placed the font in app/assets/fonts and in my stylesheet i put the
> following:
>
> p@font-face {
> font-family: "negro";
> src: url(/assets/fonts/ufonts.com_metrolis-negro-opentype.otf)
> format("truetype");
> }
>
>
> #larger_blue_text {
> color: #0000FF;
> font-family: "negro";
> }
>
> And in my view i put:
>
> <span id="larger_blue_text"> Some text</span>
I think you might have to setup config.assets.path, though I am not
certain. See
https://gist.github.com/anotheruiguy/7379570
Colin
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38221c9a-9ca4-4dff-b5a7-ab4ccbbecb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment