subsuper-nofallback-ref1.html 873 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>font-variant-position fallback</title>
  5. <meta charset="UTF-8">
  6. <style>
  7. /* sups: 0-9 + - ( ) = subs: 0-9 + - ( ) */
  8. @font-face {
  9. font-family: subsuper;
  10. src: url(../fonts/subsuper.woff); /* FiraSans with blank omega */
  11. }
  12. body {
  13. margin: 20px;
  14. font-family: subsuper, sans-serif;
  15. }
  16. p {
  17. margin: 0;
  18. font-size: 75px;
  19. }
  20. h4 { font-weight: normal }
  21. span.super {
  22. -webkit-font-feature-settings: "sups" on;
  23. font-feature-settings: "sups" on;
  24. }
  25. span.sub {
  26. -webkit-font-feature-settings: "subs" on;
  27. font-feature-settings: "subs" on;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <h4>All the subscripts and superscripts should display with variant glyphs:</h4>
  33. <p>
  34. <span class=sub>3</span>C<span class=super>2</span>
  35. <span class=sub>(3)</span>C<span class=super>(2)</span>
  36. <span class=sub>21+3</span>C<span class=super>45</span>
  37. </p>
  38. </body>
  39. </html>