Ruby on Rails Sunday, December 6, 2015

Hi,

On Mon, Dec 7, 2015, at 08:27, fugee ohu wrote:
> 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
>
>

font-url automatically resolves the path to `/assets/fonts` for you so
all you need is:

src: font-url("ufonts.com_metrolis-negro-opentype.otf")
format("truetype");

--
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/1449463801.3041167.459919329.59E80D3B%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment