CSS3 font-weight, OFF OS2.usWeightClass, and weights which are not a multiple of 100.

Hello www-font,

Open Font Format (OFF [1]) states that OS2.usWeightClass is a 2-byte unsigned short and describes it as

"Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the
font."

There is an accompanying table which relates particular values 9100, 200 etc) to textual descriptions (e.g. 'Thin') and C definitions from windows.h (e.g. FW_THIN).

Values which are not multiples of 100 are not specifically allowed and not specifically disallowed; they just don't have a defined mapping to those two string sources.

I have seen fonts with weights like 250 etc so I conclude that in OFF, OS2.usWeightClass is a continuous range of cardinal numbers.

CSS3 Fonts states that the font-weight property [2], used to request styling, is an ordered sequence of tokens:

"100 to 900
    These values form an ordered sequence, where each number indicates a weight that is at least as dark as its predecessor."

and 

"Font formats that use a scale other than a nine step scale should map their scale onto the CSS scale"

and that the font-weight descriptor [3], used to tell CSS about the weight of a particular font, is also a discrete series of tokens:

"Value:  normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900"

so I conclude that values like 250 are explicitly disallowed.

The point of this email is to ask:

a) are the above assumptions correct?
b) if a value which is not a multiple of 100 is used in the CSS style system, (e.g by script, or by direct specification in a style sheet, or by animation) then it gets mapped to the nearest multiple of 100?
c) thus, animation of the font-weight property should be discrete, not continuous, despite the fact that fonts with wights that are not a multiple of 100 may be available, as the CSS style shystem does not expose their native weights?

Tracker, this relates to SVG-ACTION-2936


[1] ISO 14496-11:2009(E)
PDF downloadable at no charge by agreeing to
http://standards.iso.org/ittf/licence.html
 
[2] http://dev.w3.org/csswg/css3-fonts/#font-weight-prop

[3] http://dev.w3.org/csswg/css3-fonts/#font-prop-desc


-- 
 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups

Received on Wednesday, 9 February 2011 14:21:44 UTC