Open jfkthame opened 3 months ago
Yes, indeed we should.
How do we deal with the legacy alias though, on that interface?
Presumably the FontFace
interface can simply expose both width
and stretch
attributes, with both being mapped to the same internal value (so that setting either of them will affect the value returned by both).
For the FontFaceDescriptors
dictionary passed to the constructor, either width
and stretch
can be used to set the attribute. If both are present but have different values, what happens? We could either say this throws an error, or define which is to take precedence. (I think I'd vote for giving precedence to width
as the "canonical" name of the attribute, and only honoring stretch
if width
is not present.)
Yeah, we can have them both map to the same internal slot, that's fine.
For the dictionary, I think I weakly lean towards "defer to width
when both are present", to allow for transitional usage.
With CSS Fonts having replaced the
font-stretch
descriptor withfont-weight
, we should presumably make a corresponding change to the FontFace interface defined by CSS Font Loading.