diff options
| author | damaxwell <damaxwell@alaska.edu> | 2023-07-17 08:19:46 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-17 18:19:46 +0200 |
| commit | 7a1cd362aa150045371cc85578ef50bef2951be2 (patch) | |
| tree | d23560866992a426d2cb2ab1dcb04cf1ebb82699 /tests | |
| parent | 9b72ee4d221d1e9e8031e53631aaccd06841ff04 (diff) | |
Support for bounding box text edges (#1626)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/bugs/math-realize.png | bin | 21228 -> 21192 bytes | |||
| -rw-r--r-- | tests/ref/math/accent.png | bin | 8038 -> 8080 bytes | |||
| -rw-r--r-- | tests/ref/math/alignment.png | bin | 8040 -> 7924 bytes | |||
| -rw-r--r-- | tests/ref/math/attach.png | bin | 28615 -> 30373 bytes | |||
| -rw-r--r-- | tests/ref/math/cancel.png | bin | 24765 -> 24765 bytes | |||
| -rw-r--r-- | tests/ref/math/cases.png | bin | 2947 -> 2979 bytes | |||
| -rw-r--r-- | tests/ref/math/content.png | bin | 7883 -> 7891 bytes | |||
| -rw-r--r-- | tests/ref/math/font-features.png | bin | 3005 -> 3023 bytes | |||
| -rw-r--r-- | tests/ref/math/frac.png | bin | 28719 -> 28867 bytes | |||
| -rw-r--r-- | tests/ref/math/matrix-alignment.png | bin | 14228 -> 14102 bytes | |||
| -rw-r--r-- | tests/ref/math/multiline.png | bin | 13479 -> 13437 bytes | |||
| -rw-r--r-- | tests/ref/math/op.png | bin | 6730 -> 6576 bytes | |||
| -rw-r--r-- | tests/ref/math/spacing.png | bin | 17881 -> 18031 bytes | |||
| -rw-r--r-- | tests/ref/math/style.png | bin | 23804 -> 23825 bytes | |||
| -rw-r--r-- | tests/ref/math/underover.png | bin | 4797 -> 4731 bytes | |||
| -rw-r--r-- | tests/ref/text/edge.png | bin | 15244 -> 28077 bytes | |||
| -rw-r--r-- | tests/typ/math/attach.typ | 6 | ||||
| -rw-r--r-- | tests/typ/text/edge.typ | 18 |
18 files changed, 22 insertions, 2 deletions
diff --git a/tests/ref/bugs/math-realize.png b/tests/ref/bugs/math-realize.png Binary files differindex 2a17f629..5ce129f6 100644 --- a/tests/ref/bugs/math-realize.png +++ b/tests/ref/bugs/math-realize.png diff --git a/tests/ref/math/accent.png b/tests/ref/math/accent.png Binary files differindex 5a963b38..1065576e 100644 --- a/tests/ref/math/accent.png +++ b/tests/ref/math/accent.png diff --git a/tests/ref/math/alignment.png b/tests/ref/math/alignment.png Binary files differindex c92e0ea9..9b5ebaf9 100644 --- a/tests/ref/math/alignment.png +++ b/tests/ref/math/alignment.png diff --git a/tests/ref/math/attach.png b/tests/ref/math/attach.png Binary files differindex 9d01e7bf..370a2ba7 100644 --- a/tests/ref/math/attach.png +++ b/tests/ref/math/attach.png diff --git a/tests/ref/math/cancel.png b/tests/ref/math/cancel.png Binary files differindex 571edcc2..146bb855 100644 --- a/tests/ref/math/cancel.png +++ b/tests/ref/math/cancel.png diff --git a/tests/ref/math/cases.png b/tests/ref/math/cases.png Binary files differindex c824a801..b9e54e75 100644 --- a/tests/ref/math/cases.png +++ b/tests/ref/math/cases.png diff --git a/tests/ref/math/content.png b/tests/ref/math/content.png Binary files differindex ce727e66..a5f5f137 100644 --- a/tests/ref/math/content.png +++ b/tests/ref/math/content.png diff --git a/tests/ref/math/font-features.png b/tests/ref/math/font-features.png Binary files differindex 1fff3547..f7c4b914 100644 --- a/tests/ref/math/font-features.png +++ b/tests/ref/math/font-features.png diff --git a/tests/ref/math/frac.png b/tests/ref/math/frac.png Binary files differindex adb9ad0c..94990208 100644 --- a/tests/ref/math/frac.png +++ b/tests/ref/math/frac.png diff --git a/tests/ref/math/matrix-alignment.png b/tests/ref/math/matrix-alignment.png Binary files differindex b272a290..c0acd958 100644 --- a/tests/ref/math/matrix-alignment.png +++ b/tests/ref/math/matrix-alignment.png diff --git a/tests/ref/math/multiline.png b/tests/ref/math/multiline.png Binary files differindex 84dcb87d..19276846 100644 --- a/tests/ref/math/multiline.png +++ b/tests/ref/math/multiline.png diff --git a/tests/ref/math/op.png b/tests/ref/math/op.png Binary files differindex 15c7329d..863c6684 100644 --- a/tests/ref/math/op.png +++ b/tests/ref/math/op.png diff --git a/tests/ref/math/spacing.png b/tests/ref/math/spacing.png Binary files differindex 5e717eff..4767f6f4 100644 --- a/tests/ref/math/spacing.png +++ b/tests/ref/math/spacing.png diff --git a/tests/ref/math/style.png b/tests/ref/math/style.png Binary files differindex cec04ba5..cf962574 100644 --- a/tests/ref/math/style.png +++ b/tests/ref/math/style.png diff --git a/tests/ref/math/underover.png b/tests/ref/math/underover.png Binary files differindex 24c96b21..62dcfefc 100644 --- a/tests/ref/math/underover.png +++ b/tests/ref/math/underover.png diff --git a/tests/ref/text/edge.png b/tests/ref/text/edge.png Binary files differindex da8ed34d..2226af9d 100644 --- a/tests/ref/text/edge.png +++ b/tests/ref/text/edge.png diff --git a/tests/typ/math/attach.typ b/tests/typ/math/attach.typ index 0f404ac7..d471551a 100644 --- a/tests/typ/math/attach.typ +++ b/tests/typ/math/attach.typ @@ -65,6 +65,12 @@ $ sqrt(a_(1/2)^zeta), sqrt(a_alpha^(1/2)), sqrt(a_(1/2)^(3/4)) \ sqrt(attach(a, tl: 1/2, bl: 3/4, tr: 1/2, br: 3/4)) $ --- +// Test for no collisions between descenders/ascenders and attachments + +$ sup_(x in P_i) quad inf_(x in P_i) $ +$ op("fff",limits: #true)^(y) quad op("yyy", limits:#true)_(f) $ + +--- // Test frame base. $ (-1)^n + (1/2 + 3)^(-1/2) $ 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") |
