tags:

views:

33

answers:

2

OK so since FixedSys won't display in Chrome or Safari I make it switch to Lucida Console. It works for Chrome but for Safari I run into an issue. Unless Lucida Console is by itself, it WILL be to the font I said. If not -- then it won't work.

Have a look at this picture:alt text

I don't know what font the first Hello world! is but it's weird. It's weird because the default font on my Safari is Times New Roman. I have checked. Also, it's not in conflict with any other style because I have tried it by itself and the problem persists.

What am I doing wrong?

Thanks.

A: 

Does it work if you include quotes around "Lucida Console"?

Douglas
Nope. :\ Sadly.
Dan
@Douglas I'm curious why put `font-family:'Lucida Console', Monaco, monospace` instead of `font-family:'Lucida Console'` results different size in chrome and safari (windows)?
Jeaffrey Gilbert
It's Windows... Whayyada expexct?
Dan
@Jeaffrey Gilbert: My guess is that you are seeing not just different sizes, but different fonts, which happen to look like they are different sizes. Assume that you don't have Lucida Console available, so the browser is going to ball back to a different font. In the first case, it will fall back to Monaco or monospace, in the second case, it will fall back to some other font - I'm not sure if the browser is allowed to reuse the parent element's font, or whether it should use the browser's default font, but it probably won't be Monaco.
Douglas
+3  A: 

font-family's fallback feature works based on installed fonts: if you have FixedSys installed, Safari will attempt to use it. You mentioned that FixedSys "won't work" in Chrome or Safari: it could be that it's interpreting FixedSys incorrectly or that your FixedSys is corrupt.

As Safari 4.0 final was released in 2009, and the current stable release of Safari is 5, it's very likely that there was a problem in Safari 4 beta's font rendering code.

If you have a font installed, there's no way in browsers that support CSS correctly (Safari, Chrome, Firefox, later versions of IE) to say "fallback to the next font even if you see that I have the first font installed". Instead, you'll either need to resolve your issues with FixedSys (that is, upgrade to a stable version of Safari to see if it fixes it) or remove it from the font-family list.

A few other notes:

  • Lucida Console is not installed on most Macs, so if you're trying to be cross-platform, you need to provide a fallback (like monospace).
  • The CSS spec requires multi-word fonts to be enclosed with quotation marks. Your CSS should look like: font-size: FixedSys, "Lucida Console"
Mark Trapp
I always though quotations around a font was the font to use first. But thank you.
Dan