CSS and custom font: best practices.
- Started
- Last post
- 4 Responses
- ItalianStallion
What's the best way to use custom fonts with css (considering browsers issues)?
Is this any good?
http://www.fontsquirrel.comSuggestions?
Thanks
- elahon0
I've had good luck with FontSquirel, finding fonts, implementing them. I've also tinkered with Google Fonts. Easier to set up, although I like the font selection better with FS.
- oktalk0
I'm guessing you mean: what's the best way to use @font-face cross browser?
This is the most recent technique:
http://www.fontspring.com/blog/t…Font Squirrel is just a repository for free web fonts (and yet their great).
- Correct...ItalianStallion
- (typo)*...and yes ...oktalk
- (typo)*...and yes they're great ...seeessess
- ETM0
Here's an example of the markup I recently used on a project. Seems to work on near everything that will support custom fonts. Its not much different than what you'll see on the sites above. I had to play a lot with things like whether to use single quotes or double quotes etc.
@font-face {
font-family: 'LeagueGothicRegular';
src: url(fonts/leaguegothic-webfont.e...
src: url(fonts/leaguegothic-webfont.e... format('eot'),
url(fonts/leaguegothic-webfont.w... format('woff'),
url(fonts/leaguegothic-webfont.t... format('truetype'),
url(fonts/leaguegothic-webfont.o... format('opentype'),
url(fonts/leaguegothic-webfont.s... format('svg');
font-weight: normal;
font-style: normal;
}- Yes, I'm trying this way and it's a good one.ItalianStallion
- jadrian_uk0
If you want same rendering on every browser the only way is Cufon.