I'm having trouble getting this @font-face to work...frustrating. Does anyone have any ideas? I'm working locally. My code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" />
<div class="sanchezregular">Why won't this font work??</div>
* Web Fonts from fontspring.com
* All OpenType features and all extended glyphs have been removed.
* Fully installable fonts can be purchased at http://www.fontspring.com
* The fonts included in this stylesheet are subject to the End User License you purchased
* from Fontspring. The fonts are protected under domestic and international trademark and
* copyright law. You are prohibited from modifying, reverse engineering, duplicating, or
* distributing this font software.
* (c) 2010-2012 Fontspring
* The fonts included are copyrighted by the vendor listed below.
* Vendor: Latinotype
* License URL: http://www.fontspring.com/fflicense/latinotype
src: url('Sanchez-Regular-webfont.eot?#iefix') format('embedded-opentype'),
Thank you for the link. I have read the information, but I still can't get it to work. I just want to make sure that their is nothing wrong with my code. I can see that I made a mistake on the last line "font-sizs: 18pt;". The instructions from Fontspring said to put the font folder where the CSS file is located, which is what I did and why I believe their may be something else wrong with my code.
> to put the font folder where the CSS file is located
If your fonts are in "font" folder, the url should be src: url('font/Sanchez-Regular-webfont.eot'); (Relative to the css file.)
Also, @font-face does not preview correctly in IE9 from a local file by default.
You can switch to IE8 mode to see if the font rule is written correctly.
It will preview in Firefox without issue too.