diff options
Diffstat (limited to 'tests/typ/text/edge.typ')
| -rw-r--r-- | tests/typ/text/edge.typ | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/typ/text/edge.typ b/tests/typ/text/edge.typ index 85aff68a..053576e8 100644 --- a/tests/typ/text/edge.typ +++ b/tests/typ/text/edge.typ @@ -9,17 +9,31 @@ From #top to #bottom ] +#let try-bounds(top, bottom) = rect(inset: 0pt, fill: conifer)[ + #set text(font: "IBM Plex Mono", top-edge: top, bottom-edge: bottom) + #top to #bottom: "yay, Typst" +] + #try("ascender", "descender") #try("ascender", "baseline") #try("cap-height", "baseline") #try("x-height", "baseline") +#try-bounds("cap-height", "baseline") +#try-bounds("bounds", "baseline") +#try-bounds("bounds", "bounds") +#try-bounds("x-height", "bounds") + #try(4pt, -2pt) #try(1pt + 0.3em, -0.15em) --- -// Error: 21-23 expected "ascender", "cap-height", "x-height", "baseline", "descender", or length, found array +// Error: 21-23 expected "ascender", "cap-height", "x-height", "baseline", "bounds", or length, found array #set text(top-edge: ()) --- -// Error: 24-26 expected "ascender", "cap-height", "x-height", "baseline", "descender", or length +// Error: 24-26 expected "baseline", "descender", "bounds", or length #set text(bottom-edge: "") + +--- +// Error: 24-36 expected "baseline", "descender", "bounds", or length +#set text(bottom-edge: "cap-height") |
