summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-26 21:16:29 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-27 14:08:31 +0200
commit17ea0d4ba91aa7dc00b2c0ff61721913a6f1d0b4 (patch)
tree43562af829c86e2c36dcacaf80473792c2e88924 /tests
parent7eeafbd4645789b92e25a7d1922410a50cbf49a6 (diff)
Make font fallback disableable
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/text/font.pngbin21435 -> 22712 bytes
-rw-r--r--tests/typ/text/font.typ19
2 files changed, 12 insertions, 7 deletions
diff --git a/tests/ref/text/font.png b/tests/ref/text/font.png
index 44183b3a..b8e0775a 100644
--- a/tests/ref/text/font.png
+++ b/tests/ref/text/font.png
Binary files differ
diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ
index fbb999f8..ecc07886 100644
--- a/tests/typ/text/font.typ
+++ b/tests/typ/text/font.typ
@@ -33,6 +33,18 @@ Emoji: 🐪, 🌋, 🏞
This is [#font(fill: rgb("FA644B")) way more] colorful.
]
+// Disable font fallback beyond the user-specified list.
+// Without disabling, Latin Modern Math would come to the rescue.
+#font("PT Sans", "Twitter Color Emoji", fallback: false)
+2π = 𝛼 + 𝛽. ✅
+
+---
+// Test class definitions.
+#font(sans-serif: "PT Sans")
+[#font(family: sans-serif) Sans-serif.] \
+[#font(monospace) Monospace.] \
+[#font(monospace, monospace: ("Nope", "Latin Modern Math")) Math.]
+
---
// Test top and bottom edge.
@@ -48,13 +60,6 @@ Emoji: 🐪, 🌋, 🏞
#try(x-height, baseline)
---
-// Test class definitions.
-#font(sans-serif: "PT Sans")
-[#font(family: sans-serif) Sans-serif.] \
-[#font(monospace) Monospace.] \
-[#font(monospace, monospace: ("Nope", "Latin Modern Math")) Math.]
-
----
// Error: 7-12 unexpected argument
#font(false)