04-27-opentype-ligatures.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Trying out ligatures</title>
  6. <style>
  7. @font-face {
  8. font-family: Vollkorn;
  9. src: url('fonts/vollkorn/Vollkorn-Regular.woff2') format('woff2'),
  10. url('fonts/vollkorn/Vollkorn-Regular.woff') format('woff');
  11. }
  12. article {
  13. max-width: 70em;
  14. margin: 0 auto;
  15. }
  16. body {
  17. font-family: Vollkorn, Georgia, Times, 'Times New Roman', serif;
  18. }
  19. p {
  20. font-size: 5em;
  21. line-height: 1.333;
  22. margin: 0;
  23. }
  24. /**
  25. * 1. Older Firefox/Gecko versions use a slightly different syntax.
  26. */
  27. p.ligatures-enabled {
  28. font-variant-ligatures: discretionary-ligatures;
  29. font-variant-ligatures: discretionary-ligatures;
  30. -webkit-font-feature-settings: "liga", "dlig";
  31. -moz-font-feature-settings: "liga", "dlig";
  32. -moz-font-feature-settings: "liga=1, dlig=1"; /* 1 */
  33. font-feature-settings: "liga", "dlig";
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <article>
  39. <p>A fine day for a different fjord!</p>
  40. <p class="ligatures-enabled">A fine day for a different fjord!</p>
  41. </article>
  42. </body>
  43. </html>