colrv1-02.html (595B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset=utf-8> 4 <title>COLRv1 font test: using the tech() function</title> 5 <style> 6 @font-face { 7 font-family: CAhem; 8 src: url("../fonts/fira/FiraSansOT-RegularItalic.otf"); /* if tech() is not parsed */ 9 src: url("CAhem.ttf") tech(color-COLRv1), 10 url("../fonts/fira/FiraSans-Regular.otf"); 11 } 12 #test { font: 100px/1 CAhem, serif; margin: 10px; padding: 10px; } 13 </style> 14 15 <!-- This should render using CAhem if COLRv1 is enabled, and FiraSans if disabled. 16 If the tech() function fails to parse at all, we'll get Fira Italic. --> 17 <div id="test">ABC</div>