font-synthesis-style.html (953B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="utf-8"/> 4 <title>CSS Test: font-synthesis-style: none disables fake italic/oblique</title> 5 <link rel="match" href="font-synthesis-style-ref.html"> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-synthesis-style"> 7 <meta name="assert" content=" If ‘style’ is not specified, user agents must not synthesize italic faces"> 8 <style> 9 @font-face { 10 font-family: "lato"; 11 src: url(/fonts/Lato-Medium.ttf); 12 } 13 @supports not (font-synthesis-style: none) { 14 .test {color: red;} 15 } 16 .test { 17 font-family: "lato"; 18 font-size: 3em; 19 } 20 .nosynth { 21 font-style: italic; 22 font-synthesis-style: none; 23 } 24 </style> 25 26 <p>Test passes if the two lines below are identical (the second line is <em>not obliqued</em>), and there is no red.</p> 27 <section class="test"> 28 <p>Filler text</p> 29 <p class="nosynth">Filler text</p> 30 </section>