- From: Paul Nelson (ATC) <paulnel@winse.microsoft.com>
- Date: Wed, 22 Aug 2007 09:23:56 -0700
- To: Bert Bos <bert@w3.org>, <www-style@w3.org>
Look to the operating system if you are on Windows. There are some
things that don't work as you would expect. If you set the font name for
the specific font name instead of font-family and weight you will work
better. Until Windows GDI is changed this is pretty hard to solve.
Regards,
Paul
-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
Behalf Of Bert Bos
Sent: Wednesday, August 22, 2007 9:17 AM
To: www-style@w3.org
Subject: Why doesn't 'font-weight: 100' work yet?
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"
$ fc-match "Gill Sans:weight=extralight:slant=roman" # 200
GillSansLight.ttf: "Gill Sans" "Light"
$ fc-match "Gill Sans:weight=light:slant=roman" # 300
GillSansLight.ttf: "Gill Sans" "Light"
$ fc-match "Gill Sans:weight=book:slant=roman" # 400/500
GillSans.ttf: "Gill Sans" "Regular"
$ fc-match "Gill Sans:weight=normal:slant=roman" # 500
GillSans.ttf: "Gill Sans" "Regular"
$ fc-match "Gill Sans:weight=demibold:slant=roman" # 600
GillSansBold.ttf: "Gill Sans" "Bold"
$ fc-match "Gill Sans:weight=bold:slant=roman" # 700
GillSansBold.ttf: "Gill Sans" "Bold"
$ fc-match "Gill Sans:weight=extrabold:slant=roman" # 800
GillSansBold.ttf: "Gill Sans" "Bold"
$ fc-match "Gill Sans:weight=black:slant=roman" # 900
GillSansBold.ttf: "Gill Sans" "Bold"
(Fontconfig uses slant instead of font-style and thin...black instead of
100...900. We could discuss whether "book" maps to 400 or to 500, but
for the rest the mapping is straightforward.)
Bert
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert@w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Wednesday, 22 August 2007 22:27:40 UTC