font-synthesis-08.html (1324B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="utf-8"/> 4 <title>CSS Test: font-synthesis style and weight</title> 5 <link rel="match" href="font-synthesis-08-ref.html"> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-synthesis"> 7 <meta name="assert" content="If ‘weight’/'style' is not specified for 8 font-synthesis property, user agents must not synthesize bold/italic faces"> 9 <style> 10 @font-face { 11 font-family: "lato"; 12 src: url(/fonts/Lato-Medium.ttf); 13 } 14 .test { 15 font-family: "lato"; 16 font-size: 3em; 17 font-style: italic; 18 font-weight: bold; 19 } 20 .auto { 21 font-synthesis: weight style; 22 } 23 .none { 24 font-synthesis: none; 25 } 26 .weight { 27 font-synthesis: weight; 28 } 29 .style { 30 font-synthesis: style; 31 } 32 </style> 33 34 <!-- If a previous font-synthesis property and value was encountered by the 35 style engine, make sure that this newer value is correctly updated and not 36 confused with an earlier value due to incorrect caching. Appearance of the 37 4 section needs to differ in weight and style respectively. --> 38 <section class="test"> 39 <p class="auto">Filler text</p> 40 <p class="none">Filler text</p> 41 <p class="weight">Filler text</p> 42 <p class="style">Filler text</p> 43 </section>