Changeset 204107 in webkit
- Timestamp:
- Aug 3, 2016, 4:50:19 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/text/system-font-weight-expected.txt (modified) (1 diff)
-
LayoutTests/fast/text/system-font-weight.html (modified) (1 diff)
-
LayoutTests/platform/ios-simulator/fast/text/system-font-weight-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r204096 r204107 1 2016-08-03 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [iOS] SF-Heavy is not accessible from web content 4 https://bugs.webkit.org/show_bug.cgi?id=160522 5 <rdar://problem/27685273> 6 7 Reviewed by Simon Fraser. 8 9 * platform/ios-simulator/fast/text/system-font-weight-expected.txt: iOS 9 is not 10 expected to pass this test, but there is no way to specify that currently using 11 TestExpectations. Instead, we can create an iOS 9 specific result. 12 * fast/text/system-font-weight-expected.txt: 13 * fast/text/system-font-weight.html: 14 1 15 2016-08-03 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/LayoutTests/fast/text/system-font-weight-expected.txt
r203764 r204107 4 4 5 5 6 PASS six.offsetWidth is not nine.offsetWidth 6 PASS four.offsetWidth is not three.offsetWidth 7 PASS five.offsetWidth is not four.offsetWidth 8 PASS six.offsetWidth is not five.offsetWidth 9 PASS eight.offsetWidth is not seven.offsetWidth 7 10 PASS successfullyParsed is true 8 11 9 12 TEST COMPLETE 10 Hello, WorldHello, World 13 Hello, World 14 Hello, World 15 Hello, World 16 Hello, World 17 Hello, World 18 Hello, World 19 Hello, World 20 Hello, World 21 Hello, World -
trunk/LayoutTests/fast/text/system-font-weight.html
r203764 r204107 6 6 <body> 7 7 <div style="font: 19px -apple-system"> 8 <span id="six" style="font-weight: 600;">Hello, World</span><span id="nine" style="font-weight: 900;">Hello, World</span> 8 <div><span id="one" style="font-weight: 100;">Hello, World</span></div> 9 <div><span id="two" style="font-weight: 200;">Hello, World</span></div> 10 <div><span id="three" style="font-weight: 300;">Hello, World</span></div> 11 <div><span id="four" style="font-weight: 400;">Hello, World</span></div> 12 <div><span id="five" style="font-weight: 500;">Hello, World</span></div> 13 <div><span id="six" style="font-weight: 600;">Hello, World</span></div> 14 <div><span id="seven" style="font-weight: 700;">Hello, World</span></div> 15 <div><span id="eight" style="font-weight: 800;">Hello, World</span></div> 16 <div><span id="nine" style="font-weight: 900;">Hello, World</span></div> 9 17 </div> 10 18 <script> 11 19 description("This test makes sure that extra-heavy weights of the system font can be achieved."); 20 var one = document.getElementById("one"); 21 var two = document.getElementById("two"); 22 var three = document.getElementById("three"); 23 var four = document.getElementById("four"); 24 var five = document.getElementById("five"); 12 25 var six = document.getElementById("six"); 26 var seven = document.getElementById("seven"); 27 var eight = document.getElementById("eight"); 13 28 var nine = document.getElementById("nine"); 14 shouldNotBe("six.offsetWidth", "nine.offsetWidth"); 29 shouldNotBe("four.offsetWidth", "three.offsetWidth"); 30 shouldNotBe("five.offsetWidth", "four.offsetWidth"); 31 shouldNotBe("six.offsetWidth", "five.offsetWidth"); 32 shouldNotBe("eight.offsetWidth", "seven.offsetWidth"); 15 33 </script> 16 34 <script src="../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r204104 r204107 1 2016-08-03 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [iOS] SF-Heavy is not accessible from web content 4 https://bugs.webkit.org/show_bug.cgi?id=160522 5 <rdar://problem/27685273> 6 7 Reviewed by Simon Fraser. 8 9 The mappings we were using from CSS font-weight to CoreText font weight were inaccurate. 10 Instead, these new mappings should be used. 11 12 Test: fast/text/system-font-weight.html 13 14 * platform/graphics/ios/FontCacheIOS.mm: 15 (WebCore::systemFontModificationAttributes): 16 1 17 2016-08-03 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
r203764 r204107 156 156 157 157 ASSERT(weight >= FontWeight100 && weight <= FontWeight900); 158 float ctWeights[] = { -0.7, -0.5, -0.23, 0, 0.2, 0.3, 0.4, 0.6, 0.8 }; 158 float ctWeights[] = { 159 static_cast<float>(kCTFontWeightUltraLight), 160 static_cast<float>(kCTFontWeightThin), 161 static_cast<float>(kCTFontWeightLight), 162 static_cast<float>(kCTFontWeightRegular), 163 static_cast<float>(kCTFontWeightMedium), 164 static_cast<float>(kCTFontWeightSemibold), 165 static_cast<float>(kCTFontWeightBold), 166 static_cast<float>(kCTFontWeightHeavy), 167 static_cast<float>(kCTFontWeightBlack) 168 }; 159 169 [traitsDictionary setObject:[NSNumber numberWithFloat:ctWeights[weight]] forKey:static_cast<NSString *>(kCTFontWeightTrait)]; 160 170
Note:
See TracChangeset
for help on using the changeset viewer.