When using explicit values for font weights, faces defined via @font-face rules are interpreted differently from families defined via normal font-family usage.
Created attachment 20942 [details]
testcase, comparison of weight matching with and without @font-face
When the attached testcase is viewed in Webkit, several of the weight mappings are incorrect:
1. Arial 800 should appear using Arial-Black
2. In the section labeled "Using font-family: Helvetica Neue",
Helvetica Neue 200 should appear as HelveticaNeue-UltraLight
(beware: 10.4 has correct weight definitions for this font but under 10.5 Cocoa assigns incorrect font weights to HelveticaNeue-UltraLight)
3. In the section labeled "Using @font-face definitions"
Helvetica Neue 600 should appear as HelveticaNeue-Bold
Helvetica Neue 800 should appear as HelveticaNeue-CondensedBlack
The relevant weight mapping rules are detailed here:
"If there are fewer then 9 weights in the family, the default algorithm for filling the "holes" is as follows. If '500' is unassigned, it will be assigned the same font as '400'. If any of the values '600', '700', '800' or '900' remains unassigned, they are assigned to the same face as the next darker assigned keyword, if any, or the next lighter one otherwise. If any of '300', '200' or '100' remains unassigned, it is assigned to the next lighter assigned keyword, if any, or the next darker otherwise."
Created attachment 20943 [details]
screenshot of testcase on 10.4
Fixed in <http://trac.webkit.org/changeset/34794>.