- From: Bert Bos <bert@w3.org>
- Date: Wed, 22 Aug 2007 18:17:23 +0200
- To: www-style@w3.org
- Message-Id: <200708221817.24040.bert@w3.org>
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
Attachments
- text/html attachment: tmp.html
Received on Wednesday, 22 August 2007 16:17:31 UTC