size-adjust-01.html (1214B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <link rel="author" href="mailto:jkew@mozilla.com"> 4 <link rel="help" href="https://drafts.csswg.org/css-fonts-5/"> <!-- XXX to be added --> 5 <link rel="match" href="size-adjust-01-ref.html"> 6 <link rel="assert" title="Tests that size-adjust scales the glyphs of the face"> 7 <title>Tests the size-adjust descriptor of @font-face</title> 8 <style> 9 @font-face { 10 font-family: reference-font; 11 src: local(Ahem), url(/fonts/Ahem.ttf); 12 size-adjust: 100%; 13 /* Uppercase ASCII only + U+20 to make this "first available font" */ 14 unicode-range: U+20,U+41-5A; 15 } 16 17 @font-face { 18 font-family: large-font; 19 src: local(Ahem), url(/fonts/Ahem.ttf); 20 size-adjust: 150%; 21 /* Uppercase ASCII only + U+20 to make this "first available font" */ 22 unicode-range: U+20,U+41-5A; 23 } 24 25 div { 26 font-size: 40px; 27 line-height: 100px; 28 } 29 30 .reference { 31 font-family: reference-font, sans-serif; 32 } 33 34 .large { 35 font-family: large-font, sans-serif; 36 } 37 </style> 38 39 <p>size-adjust:100% should be the same as no override.</p> 40 41 <div> 42 <span class="reference">TheQuickBrownFox</span> 43 </div> 44 45 <p>size-adjust:150% should affect Ahem characters only.</p> 46 47 <div> 48 <span class="large">TheQuickBrownFox</span> 49 </div>