Re: Why doesn't 'font-weight: 100' work yet?

On Wednesday 2007-08-22 18:17 +0200, Bert Bos wrote:
> It used to be that the font APIs on many operating systems weren't rich 
> enough to put more than two weights in one family. That's no longer the 
> case, but most browsers still don't seem to recognize any weights other 
> than 'normal' or 'bold'. Why is that?
> 
> E.g., the fontconfig library on my system finds all three weights of 
> Gill Sans, but my browser doesn't:
> 
>     $ fc-match "Gill Sans:weight=thin:slant=roman"        # 100
>     GillSansLight.ttf: "Gill Sans" "Light"

Firefox has code to handle this.  For X11-ish platforms (since
you're talking about fontconfig), on the 1.8 branch (Firefox 1.5 and
Firefox 2), see:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/src/gtk/nsFontMetricsXft.cpp&rev=1.69.4.2&mark=1116-1118#1106
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/src/gtk/nsFontMetricsXft.cpp&rev=1.69.4.2&mark=1116-1118#1106
or on the trunk (for Firefox 3, etc.), see:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxPangoFonts.cpp&rev=1.94&mark=312-362,388#312

I'm not sure if I have any fonts that I could test this on, though.
Are there free fonts that it should work with?

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Wednesday, 22 August 2007 18:56:44 UTC