...

View Full Version : @font-face doesn't work on mac safari?



cpkid2
05-17-2010, 02:29 AM
I'm using the @font-face declaration in one small part of a site I'm building. I've tested it on Windows Chrome, FF, Safari, IE and it all shows fine. However, my client is telling me Arial is showing up instead of the font I've chosen and he's using Safari on a Mac. Is there something different I have to do in order for it to display right on a Mac Safari?

Here is what I have now...


@font-face {
font-family:'TrashHandRegular';src:url('TrashHand.eot');
src:local('TrashHand'), local('TrashHand'), url('TrashHand.woff') format('woff'), url('TrashHand.ttf') format('truetype'), url('TrashHand.svg#TrashHand') format('svg');
}

#tweet {
display:table-cell;
font:18px/20px TrashHand, Helvetica, Arial, Sans-Serif;
height:130px;
padding-top:20px;
vertical-align:middle;
width:235px;
}

drhowarddrfine
05-17-2010, 05:49 AM
@font-face works fine on Safari and Macs after v3.1.

cpkid2
05-17-2010, 06:38 AM
Actually, I just tested the site on another computer and it looks like it's not showing. So I'm guessing the path to file is incorrect but then why would it work on my own computer? Also isn't the path to file relative to the style sheet path? If so, my code should be correct. Man, I'm confused!

VIPStephan
05-17-2010, 04:03 PM
You should use the bulletproof (smiley) method as Safari might screw up on the local declaration: http://paulirish.com/2010/font-face-gotchas/#smiley



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum