Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Side by Side Diff: LayoutTests/fast/text/font-ligature-letter-spacing.html

Issue 847813002: Update typesetting features when letter-spacing is changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/text/font-ligature-letter-spacing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
5 <title>Letter spacing and Ligature</title> 5 <title>Letter spacing and Ligature</title>
6 6
7 <style type="text/css"> 7 <style type="text/css">
8 @font-face { 8 @font-face {
9 font-family: megalopolis; 9 font-family: megalopolis;
10 src: url(../../third_party/MEgalopolis/MEgalopolisExtra.woff) format("woff"); 10 src: url(../../third_party/MEgalopolis/MEgalopolisExtra.woff) format("woff");
11 } 11 }
12 12
13 .dligDiv { 13 .dligDiv {
14 -moz-font-feature-settings:"frac" 1, "dlig" 1; 14 -moz-font-feature-settings:"frac" 1, "dlig" 1;
15 -moz-font-feature-settings:"frac=1, dlig=1"; 15 -moz-font-feature-settings:"frac=1, dlig=1";
16 -ms-font-feature-settings:"frac" 1, "dlig" 1; 16 -ms-font-feature-settings:"frac" 1, "dlig" 1;
17 -o-font-feature-settings:"frac" 1, "dlig" 1; 17 -o-font-feature-settings:"frac" 1, "dlig" 1;
18 -webkit-font-feature-settings:"frac" 1, "dlig" 1; 18 -webkit-font-feature-settings:"frac" 1, "dlig" 1;
19 font-feature-settings:"frac" 1, "dlig" 1; 19 font-feature-settings:"frac" 1, "dlig" 1;
20 } 20 }
21 21
22 .fontVariantDiv {
23 font-variant-ligatures: discretionary-ligatures;
24 }
25
22 .common { 26 .common {
23 font-size: 24px; 27 font-size: 24px;
24 line-height: 100%; 28 line-height: 100%;
25 padding: 0px; 29 padding: 0px;
26 letter-spacing:20px; 30 letter-spacing:20px;
27 font-family: megalopolis; 31 font-family: megalopolis;
28 } 32 }
29 33
30 p { font-family: serif; font-style: italic; } 34 p { font-family: serif; font-style: italic; }
31 </style> 35 </style>
32 36
33 <script src="../../resources/testharness.js"></script> 37 <script src="../../resources/testharness.js"></script>
34 <script src="../../resources/testharnessreport.js"></script> 38 <script src="../../resources/testharnessreport.js"></script>
35 <script> 39 <script>
36 setup({ explicit_done: true }); 40 setup({ explicit_done: true });
37 function testLetterSpaceAndLigature() { 41 function testLetterSpaceAndLigature(element) {
38 var elementWidthWithLigatureAndLetterSpacing = document.getElementsByCla ssName("dligSpan")[0].getBoundingClientRect().width; 42 var elementWidthWithLigatureAndLetterSpacing = element.getBoundingClient Rect().width;
39 var elementWidthWithLetterSpacing = document.getElementsByClassName("let terSpace")[0].getBoundingClientRect().width; 43 var elementWidthWithLetterSpacing = letterSpace.getBoundingClientRect(). width;
40 test(function() { 44 test(function() {
41 assert_equals(elementWidthWithLigatureAndLetterSpacing, elementWidth WithLetterSpacing, "Ligature not applied due to letter spacing."); 45 assert_equals(elementWidthWithLigatureAndLetterSpacing, elementWidth WithLetterSpacing, "Ligature not applied due to letter spacing.");
42 }, "Ligature expected not to be applied due to letter spacing."); 46 }, "Ligature expected not to be applied due to letter spacing.");
47 }
48
49 function runTest() {
50 testLetterSpaceAndLigature(dligSpan);
51 testLetterSpaceAndLigature(fontVariantSpan);
43 done(); 52 done();
44 } 53 }
45 </script> 54 </script>
46 </head> 55 </head>
47 <body onload="testLetterSpaceAndLigature();"> 56 <body onload="runTest();">
48 <div class="dligDiv common"> 57 <div class="dligDiv common">
49 <span class="dligSpan">CACACACA</span> 58 <span id="dligSpan">CACACACA</span>
59 </div>
60
61 <div class="fontVariantDiv common">
62 <span id="fontVariantSpan">CACACACA</span>
50 </div> 63 </div>
51 64
52 <div class="common"> 65 <div class="common">
53 <span class="letterSpace">CACACACA</span> 66 <span id="letterSpace">CACACACA</span>
54 </div> 67 </div>
55 </body> 68 </body>
56 </html> 69 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/text/font-ligature-letter-spacing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698