Closed
Bug 467503
Opened 17 years ago
Closed 15 years ago
in @font-face, font-{weight,style,stretch}: normal is not the same thing as no descriptor
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: zwol, Assigned: jtd)
Details
(Whiteboard: [spec bug])
Per <http://dev.w3.org/csswg/css3-fonts/#font-property>,
... If [the font-weight, font-style, or font-stretch descriptors] are
omitted, data in the font itself is used to determine the characteristics
of embedded fonts.
but this is not what we are doing: InsertFontFaceRule (nsPresContext.cpp) treats the absence of a font-weight, font-style, or font-stretch descriptor as equivalent to the 'normal' keyword.
Flags: wanted1.9.1?
Flags: wanted1.9.1? → blocking1.9.1+
Priority: -- → P2
Comment 1•16 years ago
|
||
I wonder what would be best here. The behavior suggested above would be easiest for authors, but would be less efficient for users as such font-faces would need to be downloaded just to test whether they have suitable style.
What we are doing is closer to the 2002 working draft, http://www.w3.org/TR/css3-webfonts/#font-descriptions
"Each @font-face description specifies a value for every font descriptor,
either implicitly or explicitly. Those not given explicit values in the
description take the initial value listed with each descriptor in this
specification."
except that the initial value in that draft was the special "all".
Karl, maybe you could take this from John?
(In reply to comment #1)
> I wonder what would be best here. The behavior suggested above would be
> easiest for authors, but would be less efficient for users as such font-faces
> would need to be downloaded just to test whether they have suitable style.
Is this information usually near the start of the file? If so, then in principle the browser could cancel the download early once it had the style information and determined the font was not needed. In which case we wouldn't want to write the spec assuming the font downloads are a problem.
| Assignee | ||
Comment 3•16 years ago
|
||
This is more a spec bug, I just haven't gotten around to removing the wording that Zack noted and listing the initial values. I think all of these descriptors should default to 'normal' if omitted. If you use the information in the font when the value is omitted then you run into situations where you can't decide which font to use without downloading all faces:
@font-face {
font-family: burp;
src: url(burp.ttf);
}
@font-face {
font-family: burp;
src: url(burp.ttf);
font-weight: bold;
}
body { font-family: burp; font-style: italic; }
So I would remove this from the blocker list. Is there a way to mark something "spec bug"?
Sure! :-)
Flags: blocking1.9.1+
Whiteboard: [spec bug]
| Assignee | ||
Comment 5•15 years ago
|
||
Current draft of the spec explicitly makes 'normal' the default for these descriptors.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•