diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-22 14:08:50 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-22 14:08:50 +0100 |
| commit | 98336bfafb947f0b4d55a79c422b915bb417c185 (patch) | |
| tree | bf0ead89a3d7eed3d8bb87d013c2a813633c75e4 /tests | |
| parent | 39f55481ed7bc5ebc6d310924e90e7b6c0760d3b (diff) | |
Better font family definitions ✒
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/library/font.png | bin | 10697 -> 12348 bytes | |||
| -rw-r--r-- | tests/typ/library/font.typ | 9 | ||||
| -rw-r--r-- | tests/typeset.rs | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/ref/library/font.png b/tests/ref/library/font.png Binary files differindex 1cfbc499..0e24bb5d 100644 --- a/tests/ref/library/font.png +++ b/tests/ref/library/font.png 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, |
