summaryrefslogtreecommitdiff
path: root/tests/library/typ/font.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/library/typ/font.typ')
-rw-r--r--tests/library/typ/font.typ46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/library/typ/font.typ b/tests/library/typ/font.typ
index 1bfc1fa6..7f13e8a6 100644
--- a/tests/library/typ/font.typ
+++ b/tests/library/typ/font.typ
@@ -1,37 +1,37 @@
// Test configuring font properties.
-#[font "PT Sans", 10pt]
+#font("PT Sans", 10pt)
// Set same font size in three different ways.
-#[font 20pt][A]
-#[font 200%][A]
-#[font 15pt + 50%][A]
+#font(20pt)[A]
+#font(200%)[A]
+#font(15pt + 50%)[A]
// Do nothing.
-#[font][Normal]
+#font[Normal]
// Set style (is available).
-#[font style: italic][Italic]
+#font(style: italic)[Italic]
// Set weight (is available).
-#[font weight: bold][Bold]
+#font(weight: bold)[Bold]
// Set stretch (not available, matching closest).
-#[font stretch: ultra-condensed][Condensed]
+#font(stretch: ultra-condensed)[Condensed]
-// Error: 8-13 unexpected argument
-#[font false]
+// Error: 7-12 unexpected argument
+#font(false)
-// Error: 3:15-3:19 expected font style, found font weight
-// Error: 2:29-2:35 expected font weight, found string
-// Error: 1:44-1:45 expected font family or array of font families, found integer
-#[font style: bold, weight: "thin", serif: 0]
+// Error: 3:14-3:18 expected font style, found font weight
+// Error: 2:28-2:34 expected font weight, found string
+// Error: 1:43-1:44 expected font family or array of font families, found integer
+#font(style: bold, weight: "thin", serif: 0)
-// Warning: 16-20 should be between 100 and 900
-#[font weight: 2700]
+// Warning: 15-19 should be between 100 and 900
+#font(weight: 2700)
-// Error: 8-28 unexpected argument
-#[font something: "invalid"]
+// Error: 7-27 unexpected argument
+#font(something: "invalid")
---
// Test font fallback and class definitions.
@@ -40,17 +40,17 @@
Emoji: 🏀
// CMU Serif + Noto Emoji.
-#[font "CMU Serif", "Noto Emoji"][
+#font("CMU Serif", "Noto Emoji")[
Emoji: 🏀
]
// Class definitions.
-#[font serif: ("CMU Serif", "Latin Modern Math", "Noto Emoji")]
-#[font serif][
+#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)]
+#font(sans-serif: "Noto Emoji")
+#font(sans-serif: ("Archivo", sans-serif))
New sans-serif. 🚀