Why are monospaced fonts impossible to specify?

Hi all,

Someone asked me a question recently: how do I get a web page to show 
text in Osaka Mono?

In particular, this person wants the pages to display on a Macintosh. 
Apple ship two Osaka True Type fonts with Mac OS X, one of which is 
Osaka and the other Osaka-Mono (to use the Postscript Names...) Should 
be easy, right? Wrong.

Both of these have the font family name "Osaka" which seems reasonable 
enough. However there's no obvious way to specify one wants the 
mono-spaced version of a font in CSS. Its not a font-variant or a 
font-style property like 'Bold' or 'small-caps' would be.

After doing some further reading, I realized the only way I could see 
of doing this is CSS is @font-face, something like this:

@font-face {
	src: local("Osaka-Mono")
	font-family: "Osaka Mono";

//hrm, would I also need to specify the format here? The font is True 
Type, but I want Osaka-Mono to be interpreted as its
//Postscript Name for matching purposes. Not clear how or if I can do 
this..?

}

And then I guess I could use it like this:

.osaka-mono-demo { font-family: "Osaka Mono"; }

Of course, this whole discussion is completely hypothetical, as in so 
far as I can tell, no one has ever implemented @font-face ?

Which leads me to my question: is there a reason why this is so complex?

I realize that on some systems Osaka Mono might have a unique family 
name, but we can hardly be relying on that as a strategy to help people 
be able to use monospaced variants? What's especially ironic is that 
the CSS spec specifically mentions Osaka Monospaced when it gives an 
example of a fixed-pitch Japanese font. Amusing that one can't 
necessarily use it!

One would have thought that if 'small-caps' is a font variant, then so 
is monospaced?

I realize that if monospaced were to be a variant, it wouldn't wave a 
magic wand and make it work in browsers tomorrow, but its a much 
smaller more manageable thing to try to add to a browser than the whole 
of @font-face.

Can anyone comment on why monospaced wasn't done as a variant? Is this 
fundamentally incompatible with existing font matching algorithms or 
anything like that?

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

         (see you later space cowboy ...)

Received on Sunday, 29 February 2004 17:18:55 UTC