English 中文(简体)
Firefox 3.5 on a Mac and @font-face
原标题:

I m having a problem with @font-face. It actually works flawlessly on Safari, internet explorer 7+ and Firefox for windows but not at all on firefox for mac.

I m using code from the bulletproof @font-face article

Here s my Code:

@font-face {
    font-family: "QlassikMediumRegular";
    src: url("../fonts/Qlassik_TB.eot");
    src: local("Qlassik Medium Regular"), local("QlassikMedium"), url("../fonts/Qlassik_TB.ttf") format("truetype")
}

@font-face {
    font-family: "QlassikBoldRegular";
    src: url("../fonts/QlassikBold_TB.eot");
    src: local("Qlassik Bold Regular"), local("QlassikBold"), url("../fonts/QlassikBold_TB.ttf") format("truetype")
}

Here is the link to my site in question: link text

问题回答

I typically use a more extended @font-face declaration:

@font-face {
font-family:  TypewriterOldstyle ;
src: url( ../fonts/typeo-webfont.eot );
src: url( ../fonts/typeo-webfont.eot?#iefix ) format( eot ),
     url( ../fonts/typeo-webfont.woff ) format( woff ),
     url( ../fonts/typeo-webfont.ttf ) format( truetype ),
     url( ../fonts/typeo-webfont.svg#webfonty9r23iiq ) format( svg );
font-weight: normal;
font-style: normal;
}

You could try generating at http://www.fontsquirrel.com/fontface/generator

Had the same problem, font s gave 301 error saying i did not have access to the font file.

What works best for me is placing the font file s in the same directory as the .css file, no hassle with anny .htaccess or other server config file s.

So i have one external fonts.css file containing all the css font line s within the font directory. Then i can include this .css file on the page i would like to use this font. Make sure you don t make additional directory s so you can call the font without anny directory.

more info: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Private FireFox plugin

I m looking at getting a FireFox plugin developed - but is it possible to create a plugin that is for private use only, so only those I share it with have it and not open to the masses? Need this for ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Cross-browser development

I m developing a web application for a new service, starting from Firefox 3.5. The interface design is tableless, only using divs + CSS & performance-blessed practices. Now, while being ...

Cross browser way of setting IFrame to "about:blank"?

Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?

热门标签