When I run in debug mode on localhost it all works. When I publish to the server it fails. I've done this before with a different font and it works. Any ideas of what I should check or try?
The problem turned out to be that the font files were not publishing with the project even though they were included in the project and were marked "copy to output". Manually copying the font files solved the problem.
kraznodar
Contributor
3333 Points
883 Posts
I need help figuring out why an embeded custom font works local but not when published to server.
Feb 23, 2012 04:15 PM|LINK
I'm doing the standard custom font CSS with a font converted by FontSquirrel. My CSS looks like this:
@font-face {
font-family: 'Child';
src: url('/Fonts/Child.eot');
src: url('/Fonts/Child.eot?iefix') format('embedded-opentype'),
url('/Fonts/Child.woff') format('woff'),
url('/Fonts/Child.ttf') format('truetype'),
url('/Fonts/Child.svg#webfontGpMqOOsN') format('svg');
font-weight: normal;
font-style: normal;
}
.ChildFont
{
font-family: 'Child';
line-height: 150%;
}
And the html looks like this:
<p><span class="ChildFont" style="color:#94070a; font-size:20px;">Lineworker up!</span></p>
When I run in debug mode on localhost it all works. When I publish to the server it fails. I've done this before with a different font and it works. Any ideas of what I should check or try?
raju dasa
Star
14406 Points
2449 Posts
Re: I need help figuring out why an embeded custom font works local but not when published to ser...
Feb 23, 2012 04:38 PM|LINK
HI,
R u sure, fonts are downloading from the remote server when accessed through browser?
check the used relative path to fonts is correct!
for reference,
check this site:
http://www.howtoplaza.com/how-to-use-custom-fonts-on-your-website-with-css
rajudasa.blogspot.com || blog@opera
kraznodar
Contributor
3333 Points
883 Posts
Re: I need help figuring out why an embeded custom font works local but not when published to ser...
Feb 24, 2012 03:36 PM|LINK
The problem turned out to be that the font files were not publishing with the project even though they were included in the project and were marked "copy to output". Manually copying the font files solved the problem.