0

I designed a small template which uses Trebuchet MS font (PSD). Now, if I use this font in HTML/CSS it looks quite different. Is there any possibility to achive the same or a better quality ?

Maybe Google Webfont ? Is there a simmilar font ? Or should I use CSS @font-face?

CSS:
font-family: "Trebuchet MS", sans serif;

Best regards

ihkawiss
  • 986
  • 3
  • 9
  • 25

3 Answers3

3

The basic answer is No.

You're talking about font anti-aliasing (or font smoothing). Photoshop gives anti-aliasing in four flavors (Sharp, Crisp, Strong, Smooth). Browsers don't do the same thing, generally the OS will control font anti-aliasing.

more on browsers and fonts: Type rendering: web browsers

MikeM
  • 27,227
  • 4
  • 64
  • 80
1

No, unless you can use flash generated or image fonts, etc. You're looking at the differences in how two different beasts render fonts and it's mostly stuff outside your control.

vector
  • 7,334
  • 8
  • 52
  • 80
0

@font-face is new and doesn't work in all browsers. In order to maintain cross browser support, you can use the JS based Cufon to deliver whatever font you want.

http://cufon.shoqolate.com/generate/

Brant
  • 1,764
  • 11
  • 18
  • 2
    `@font-face is new and doesn't work in all browsers`...it's actually not that new and is very well supported http://caniuse.com/#feat=fontface – MikeM Sep 07 '12 at 18:05
  • 1
    I guess my point was legacy support, anything prior to IE 9. Cufon, being JS based, should work in any browser that's supports JS. @font-face won't. – Brant Sep 07 '12 at 18:07
  • 2
    but I think you mean anything prior to IE4 since `@font-face` has been around since [CSS2 (1998)](http://www.zeldman.com/2009/08/17/web-fonts-and-standards/) – MikeM Sep 07 '12 at 18:10
  • Trebuchet is considered web safe. http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html – Scott Simpson Sep 07 '12 at 18:16
  • Per W3C, it's not supported past IE9. "The @font-face at-rule allows you to define custom fonts. It was first defined in the CSS2 specification, but was removed from CSS2.1." W3C Says "Note: Internet Explorer 8 and earlier versions, do not support the font-face rule." – Brant Sep 07 '12 at 18:19
  • @mdmullinax: Or rather it was going to be in CSS2, but pushed back due to interoperability concerns (and Microsoft generally being Microsoft). – BoltClock Sep 07 '12 at 18:20
  • @Brant: I find it hard to believe that W3C would say that. W3C usually makes no comments or notes about individual browsers whatsoever. – BoltClock Sep 07 '12 at 18:21
  • 2
    Ah, W3Schools. W3Schools is not W3C, despite the similar names. And in this case, they're half-right and all wrong: IE8 and earlier do support the `@font-face` rule, but they don't support all font formats. – BoltClock Sep 07 '12 at 18:22