summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/library/font.pngbin10697 -> 12348 bytes
-rw-r--r--tests/typ/library/font.typ9
-rw-r--r--tests/typeset.rs2
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/ref/library/font.png b/tests/ref/library/font.png
index 1cfbc499..0e24bb5d 100644
--- a/tests/ref/library/font.png
+++ b/tests/ref/library/font.png
Binary files differ
diff --git a/tests/typ/library/font.typ b/tests/typ/library/font.typ
index 3e818f19..13f71125 100644
--- a/tests/typ/library/font.typ
+++ b/tests/typ/library/font.typ
@@ -49,6 +49,13 @@ Emoji: 🐪, 🌋, 🏞
#try(x-height, baseline)
---
+// Test class definitions.
+#font(sans-serif: "PT Sans")
+#font(sans-serif)[Sans-serif.] \
+#font(monospace)[Monospace.] \
+#font(monospace, monospace: ("Nope", "Latin Modern Math"))[Math.] \
+
+---
// Ref: false
// Error: 7-12 unexpected argument
@@ -56,7 +63,7 @@ Emoji: 🐪, 🌋, 🏞
// 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
+// Error: 1:43-1:44 expected string or array of strings, found integer
#font(style: bold, weight: "thin", serif: 0)
// Warning: 15-19 should be between 100 and 900
diff --git a/tests/typeset.rs b/tests/typeset.rs
index 0a22c96b..5a59a129 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -5,7 +5,7 @@ use std::fs;
use std::path::Path;
use std::rc::Rc;
-use fontdock::fs::FsIndex;
+use fontdock::FsIndex;
use image::{GenericImageView, Rgba};
use tiny_skia::{
Canvas, Color, ColorU8, FillRule, FilterQuality, Paint, Pattern, Pixmap, Rect,