diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/full/coma.typ | 1 | ||||
| -rw-r--r-- | tests/typ/library/font.typ | 42 |
2 files changed, 16 insertions, 27 deletions
diff --git a/tests/typ/full/coma.typ b/tests/typ/full/coma.typ index 4779c2c1..39404a35 100644 --- a/tests/typ/full/coma.typ +++ b/tests/typ/full/coma.typ @@ -1,6 +1,5 @@ // Configuration with `page` and `font` functions. #page(width: 450pt, height: 380pt, margins: 1cm) -#font("CMU Serif") // There are variables and they can take normal values like strings, ... #let city = "Berlin" diff --git a/tests/typ/library/font.typ b/tests/typ/library/font.typ index 7f13e8a6..165bdc10 100644 --- a/tests/typ/library/font.typ +++ b/tests/typ/library/font.typ @@ -1,11 +1,9 @@ // Test configuring font properties. -#font("PT Sans", 10pt) - // Set same font size in three different ways. -#font(20pt)[A] +#font(22pt)[A] #font(200%)[A] -#font(15pt + 50%)[A] +#font(16.5pt + 50%)[A] // Do nothing. #font[Normal] @@ -19,6 +17,20 @@ // Set stretch (not available, matching closest). #font(stretch: ultra-condensed)[Condensed] +// Set family. +#font("PT Sans")[Sans serif] + +// Emoji. +Emoji: 🐪, 🌋, 🏞 + +// Math. +#font("Latin Modern Math")[ + ∫ 𝛼 + 3𝛽 d𝑡 +] + +--- +// Ref: false + // Error: 7-12 unexpected argument #font(false) @@ -32,25 +44,3 @@ // Error: 7-27 unexpected argument #font(something: "invalid") - ---- -// Test font fallback and class definitions. - -// Source Sans Pro + Segoe UI Emoji. -Emoji: 🏀 - -// CMU Serif + Noto Emoji. -#font("CMU Serif", "Noto Emoji")[ - Emoji: 🏀 -] - -// Class definitions. -#font(serif: ("CMU Serif", "Latin Modern Math", "Noto Emoji")) -#font(serif)[ - Math: ∫ α + β ➗ 3 -] - -// Class definition reused. -#font(sans-serif: "Noto Emoji") -#font(sans-serif: ("Archivo", sans-serif)) -New sans-serif. 🚀 |
