Changeset 31850 in webkit
- Timestamp:
- Apr 13, 2008, 8:56:35 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31849 r31850 1 2008-04-13 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=18307 6 <rdar://problem/5842546> REGRESSION (r31620): Incorrect Hiragino Kaku Gothic, font-weight:500 7 8 Test: fast/css/font-weight-1.html 9 10 * platform/graphics/mac/FontCacheMac.mm: 11 (WebCore::toAppKitFontWeight): Adjusted the mapping to cover the AppKit 12 weight range from 2 to 12, because AppKit weight 1 never occurs. The 13 new mapping matches font-weight: n00 to ISO weight Wn. 14 * platform/mac/WebFontCache.mm: 15 (betterChoice): Changed the midpoint used when deciding between two 16 candidates that deviate from the desired weight by the same amount. 17 1 18 2008-04-12 David Hyatt <hyatt@apple.com> 2 19 -
trunk/WebCore/platform/graphics/mac/FontCacheMac.mm
r31620 r31850 126 126 { 127 127 static int appKitFontWeights[] = { 128 1, // FontWeight100129 2, // FontWeight200130 3, // FontWeight300128 2, // FontWeight100 129 3, // FontWeight200 130 4, // FontWeight300 131 131 5, // FontWeight400 132 132 6, // FontWeight500 133 7, // FontWeight600133 8, // FontWeight600 134 134 9, // FontWeight700 135 135 10, // FontWeight800 -
trunk/WebCore/platform/mac/WebFontCache.mm
r31689 r31850 91 91 int candidateWeightDeltaMagnitude = abs(candidateWeight - desiredWeight); 92 92 93 // If both are the same distance from the desired weight, prefer the candidate if it is further from regular.93 // If both are the same distance from the desired weight, prefer the candidate if it is further from medium. 94 94 if (chosenWeightDeltaMagnitude == candidateWeightDeltaMagnitude) 95 return abs(candidateWeight - 5) > abs(chosenWeight - 5);95 return abs(candidateWeight - 6) > abs(chosenWeight - 6); 96 96 97 97 // Otherwise, prefer the one closer to the desired weight.
Note:
See TracChangeset
for help on using the changeset viewer.