Bug 21466 - defining bold @font-face before normal font weight @font-face 'looses' bold @font-face
Summary: defining bold @font-face before normal font weight @font-face 'looses' bold @...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 03:54 PDT by John Engelhart
Modified: 2010-07-16 12:31 PDT (History)
4 users (show)

See Also:


Attachments
tarball of .html that demonstrates the bug (78.92 KB, application/octet-stream)
2008-10-08 03:56 PDT, John Engelhart
no flags Details
Cropped screen grab of what the tarball displays (64.78 KB, image/png)
2008-10-08 03:58 PDT, John Engelhart
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Engelhart 2008-10-08 03:54:05 PDT
Mac PPC Version 4.0 (5528.1, r37300)
Bug is also present in latest Safari 4 developer preview.

Pretty simple, really.  If you use @font-face to specify a new font-family, and define the font-weight:bold definitions before the standard font-weight definitions, the bold fonts 'disappear' and are replaced with their normal weight equivalent.  There is no problem if the bold font-weights are defined after the normal font-weights.

See the attached tarball for a concise demonstration of the bug.  The font uses to define a new font-family with @font-face is the GhostScript LetterGothic font (OpenType).  The LetterGothic font is made up of four files: normal, italic, bold, italic+bold.  Also attached is a cropped screen grab of the attached .html (for convenience)
Comment 1 John Engelhart 2008-10-08 03:56:24 PDT
Created attachment 24188 [details]
tarball of .html that demonstrates the bug

This tarball includes the GhostScript LetterGothic OpenType font which is why its so big.
Comment 2 John Engelhart 2008-10-08 03:58:43 PDT
Created attachment 24189 [details]
Cropped screen grab of what the tarball displays

For convenience, mostly, so you don't have to d/l and unpack the tarball to see the problem.
Comment 3 Michael Newton 2009-04-21 09:57:59 PDT
You can see the same thing here with italics: http://www.alistapart.com/d/cssatten/nels.html

"The Road to Enlightenment" should be italicized but is not. The fonts are defined at http://www.princexml.com/fonts/larabie/index.css where the bold and italic variations are defined before the standard one.
Comment 4 jjm 2009-07-08 04:29:32 PDT
True.

Webkit doesn't imply following values if left out of the @font-face declaration:
font-weight:normal;
font-style:normal;
font-variant:normal;

It should!
(Gecko does, and it saves typing/moving declarations around.)
Comment 5 Paul Irish 2010-07-15 18:20:18 PDT
Fairly sure this is a duplicate of Issue 34147 : "If @font-face does not provide an explicit italic/bold variant, regular is used"