Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > fontface src url issue View modes: 
User avatar
Member
Member
eagleag - 8/7/2013 9:10:40 AM
   
fontface src url issue
Hi,

trying to embed font using font-face
@font-face {
font-family: 'ciclefina';
src: url('App_Themes/blom/images/cicle_fina-webfont.eot');

But kentico rendering the url like this:
src: url('http://local.healthydiningfinder.com/CMSPages/App_Themes/blom/images/cicle_fina-webfont.eot');

and thus the fonatface not working.

Any idea how to fix issue?

Thanks

User avatar
Certified Developer 13
Certified Developer 13
Accepted solutionAccepted solution
kentico-jx2tech - 8/7/2013 10:15:06 AM
   
RE:fontface src url issue
try...
@font-face {
font-family: 'ciclefina';
src: url('~/App_Themes/blom/images/cicle_fina-webfont.eot');

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 8/7/2013 12:12:20 PM
   
RE:fontface src url issue
Hello,

Let me note that the '~' sign is in the output CSS file resolved as the path/URL of the current website.

Regards,
Martin Danko

User avatar
Member
Member
eagleag - 8/8/2013 1:35:08 AM
   
RE:fontface src url issue
how embarrassing, never work when yo are dead tired.

thanks :)

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/8/2013 6:46:32 AM
   
RE:fontface src url issue
kentico_martind2 wrote: Hello,

Let me note that the '~' sign is in the output CSS file resolved as the path/URL of the current website.

Regards,
Martin Danko
And note the tilde (~) will only work if you are using the Stylesheet Manager within the CMS. If you have a stylesheet in /App_Themes/Site/css/style.css directory, you have to specify the path like so (../../../App_Themes/Site/font/font.svg).