diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-08 15:08:26 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-08 15:45:14 +0200 |
| commit | 712c00ecb72b67da2c0788e5d3eb4dcc6366b2a7 (patch) | |
| tree | f5d7ef4341a4728c980d020cc173fa6bb70feaff /tests/typ/text/edge.typ | |
| parent | 977ac77e6a3298be2644a8231e93acbef9f7f396 (diff) | |
Em units
Diffstat (limited to 'tests/typ/text/edge.typ')
| -rw-r--r-- | tests/typ/text/edge.typ | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/typ/text/edge.typ b/tests/typ/text/edge.typ new file mode 100644 index 00000000..c3c60b28 --- /dev/null +++ b/tests/typ/text/edge.typ @@ -0,0 +1,25 @@ +// Test top and bottom text edge. + +--- +#set page(width: 160pt) +#set text(size: 8pt) + +#let try(top, bottom) = rect(fill: conifer)[ + #set text("IBM Plex Mono", top-edge: top, bottom-edge: bottom) + From #top to #bottom +] + +#try("ascender", "descender") +#try("ascender", "baseline") +#try("cap-height", "baseline") +#try("x-height", "baseline") +#try(4pt, -2pt) +#try(1pt + 0.3em, -0.15em) + +--- +// Error: 21-23 expected string or length, found array +#set text(top-edge: ()) + +--- +// Error: 24-26 unknown font metric +#set text(bottom-edge: "") |
