I'm not able to add fonts to my app. I did as usual for adding fonts:

 


And this is giving me an error: 

Unknown Object
Unknown object 'Gotham' used in 'CSTLight' Style Sheet.

True change changes into an Error state, and I can't publish. 

If I delete the first / on the url property of the css, the warning goes away. But the font will not be displayed on the app after compilation. 

Using the Browser preview of the app, I can go and edit the css sheet, add the / in front of that path again, and the font will be loaded. 

I get some other weird warnings as wel:

Offline Behavior
The url 'CSTLight/Gotham Narrow Book.otf' will not be cached for offline usage. Consider adding this resource to the module and use it in the stylesheet instead.


This shouldn't show up either since it's set as Deploy to target directory.


I searched the forums, and per this post, everything I'm doing is pretty much the same

Can anyone help out?

Solution

Hi!


I think the problem is the spaces that you have in the url on CSS.

Try to remove the spaces in the url and test it.


Hope it helps.


BR,

Luis

Solution

Just as a side note, my screenshot is wrong, at the time of testing both the CSS url and the font's both had spaces in them, and I got the error.


I have since removed the spaces both from the CSS url and from the file name, and that seems to have done the trick. Marking as resolved!

Mariano Picco wrote:

Just as a side note, my screenshot is wrong, at the time of testing both the CSS url and the font's both had spaces in them, and I got the error.


I have since removed the spaces both from the CSS url and from the file name, and that seems to have done the trick. Marking as resolved!

Great! I am happy for help!


Thanks