From 9eb350d7deadd59efba50b0e33acfd0967b8d0a6 Mon Sep 17 00:00:00 2001 From: damaxwell Date: Mon, 26 Jun 2023 03:51:27 -0800 Subject: support optical sizes for script/scriptscript when available (#1580) --- tests/ref/bugs/math-realize.png | Bin 21147 -> 21228 bytes tests/ref/compiler/content-field.png | Bin 2502 -> 2423 bytes tests/ref/layout/enum-numbering.png | Bin 18891 -> 19079 bytes tests/ref/math/accent.png | Bin 7994 -> 8038 bytes tests/ref/math/attach.png | Bin 28331 -> 28615 bytes tests/ref/math/cancel.png | Bin 24698 -> 24765 bytes tests/ref/math/cases.png | Bin 3134 -> 2947 bytes tests/ref/math/content.png | Bin 8357 -> 7883 bytes tests/ref/math/delimited.png | Bin 22993 -> 23111 bytes tests/ref/math/frac.png | Bin 24197 -> 24117 bytes tests/ref/math/matrix.png | Bin 25677 -> 25872 bytes tests/ref/math/multiline.png | Bin 13698 -> 13479 bytes tests/ref/math/numbering.png | Bin 12028 -> 12019 bytes tests/ref/math/op.png | Bin 6817 -> 6730 bytes tests/ref/math/opticalsize.png | Bin 0 -> 6897 bytes tests/ref/math/root.png | Bin 12274 -> 12575 bytes tests/ref/math/spacing.png | Bin 17618 -> 18271 bytes tests/ref/math/style.png | Bin 27879 -> 23804 bytes tests/ref/math/syntax.png | Bin 4850 -> 4977 bytes tests/ref/math/unbalanced.png | Bin 2482 -> 2443 bytes tests/ref/math/underover.png | Bin 4819 -> 4797 bytes tests/ref/meta/figure.png | Bin 59579 -> 49894 bytes tests/typ/math/op.typ | 1 + tests/typ/math/opticalsize.typ | 30 ++++++++++++++++++++++++++++++ 24 files changed, 31 insertions(+) create mode 100644 tests/ref/math/opticalsize.png create mode 100644 tests/typ/math/opticalsize.typ (limited to 'tests') diff --git a/tests/ref/bugs/math-realize.png b/tests/ref/bugs/math-realize.png index 4f5b887e..2a17f629 100644 Binary files a/tests/ref/bugs/math-realize.png and b/tests/ref/bugs/math-realize.png differ diff --git a/tests/ref/compiler/content-field.png b/tests/ref/compiler/content-field.png index d2f696b4..cef3274a 100644 Binary files a/tests/ref/compiler/content-field.png and b/tests/ref/compiler/content-field.png differ diff --git a/tests/ref/layout/enum-numbering.png b/tests/ref/layout/enum-numbering.png index 28755dcb..e1b2103b 100644 Binary files a/tests/ref/layout/enum-numbering.png and b/tests/ref/layout/enum-numbering.png differ diff --git a/tests/ref/math/accent.png b/tests/ref/math/accent.png index 11de9e28..5a963b38 100644 Binary files a/tests/ref/math/accent.png and b/tests/ref/math/accent.png differ diff --git a/tests/ref/math/attach.png b/tests/ref/math/attach.png index 894f553f..9d01e7bf 100644 Binary files a/tests/ref/math/attach.png and b/tests/ref/math/attach.png differ diff --git a/tests/ref/math/cancel.png b/tests/ref/math/cancel.png index 96b29c45..571edcc2 100644 Binary files a/tests/ref/math/cancel.png and b/tests/ref/math/cancel.png differ diff --git a/tests/ref/math/cases.png b/tests/ref/math/cases.png index c9eca24c..c824a801 100644 Binary files a/tests/ref/math/cases.png and b/tests/ref/math/cases.png differ diff --git a/tests/ref/math/content.png b/tests/ref/math/content.png index f7af513b..ce727e66 100644 Binary files a/tests/ref/math/content.png and b/tests/ref/math/content.png differ diff --git a/tests/ref/math/delimited.png b/tests/ref/math/delimited.png index e9f6e2c1..31d15b41 100644 Binary files a/tests/ref/math/delimited.png and b/tests/ref/math/delimited.png differ diff --git a/tests/ref/math/frac.png b/tests/ref/math/frac.png index a116c876..80327578 100644 Binary files a/tests/ref/math/frac.png and b/tests/ref/math/frac.png differ diff --git a/tests/ref/math/matrix.png b/tests/ref/math/matrix.png index d3d2681c..bf90e712 100644 Binary files a/tests/ref/math/matrix.png and b/tests/ref/math/matrix.png differ diff --git a/tests/ref/math/multiline.png b/tests/ref/math/multiline.png index ae847434..84dcb87d 100644 Binary files a/tests/ref/math/multiline.png and b/tests/ref/math/multiline.png differ diff --git a/tests/ref/math/numbering.png b/tests/ref/math/numbering.png index 6256310f..3952dea0 100644 Binary files a/tests/ref/math/numbering.png and b/tests/ref/math/numbering.png differ diff --git a/tests/ref/math/op.png b/tests/ref/math/op.png index 08d8b93b..15c7329d 100644 Binary files a/tests/ref/math/op.png and b/tests/ref/math/op.png differ diff --git a/tests/ref/math/opticalsize.png b/tests/ref/math/opticalsize.png new file mode 100644 index 00000000..9fec5520 Binary files /dev/null and b/tests/ref/math/opticalsize.png differ diff --git a/tests/ref/math/root.png b/tests/ref/math/root.png index 8a6a6e13..017582a4 100644 Binary files a/tests/ref/math/root.png and b/tests/ref/math/root.png differ diff --git a/tests/ref/math/spacing.png b/tests/ref/math/spacing.png index 2fd30e53..abcfae80 100644 Binary files a/tests/ref/math/spacing.png and b/tests/ref/math/spacing.png differ diff --git a/tests/ref/math/style.png b/tests/ref/math/style.png index 39ecc441..cec04ba5 100644 Binary files a/tests/ref/math/style.png and b/tests/ref/math/style.png differ diff --git a/tests/ref/math/syntax.png b/tests/ref/math/syntax.png index 3d09723d..028e21d6 100644 Binary files a/tests/ref/math/syntax.png and b/tests/ref/math/syntax.png differ diff --git a/tests/ref/math/unbalanced.png b/tests/ref/math/unbalanced.png index 5b4d7736..de0ee1db 100644 Binary files a/tests/ref/math/unbalanced.png and b/tests/ref/math/unbalanced.png differ diff --git a/tests/ref/math/underover.png b/tests/ref/math/underover.png index 5c825b18..24c96b21 100644 Binary files a/tests/ref/math/underover.png and b/tests/ref/math/underover.png differ diff --git a/tests/ref/meta/figure.png b/tests/ref/meta/figure.png index 524f6cfd..90f59d14 100644 Binary files a/tests/ref/meta/figure.png and b/tests/ref/meta/figure.png differ diff --git a/tests/typ/math/op.typ b/tests/typ/math/op.typ index 08395de0..2a0f84fc 100644 --- a/tests/typ/math/op.typ +++ b/tests/typ/math/op.typ @@ -11,6 +11,7 @@ $ &sin x + log_2 x \ --- // Test scripts vs limits. +#set page(width: auto) #set text(font: "New Computer Modern") Discuss $lim_(n->oo) 1/n$ now. $ lim_(n->infinity) 1/n = 0 $ diff --git a/tests/typ/math/opticalsize.typ b/tests/typ/math/opticalsize.typ new file mode 100644 index 00000000..c96e4a32 --- /dev/null +++ b/tests/typ/math/opticalsize.typ @@ -0,0 +1,30 @@ +// test optical sized variants in sub/superscripts + +--- + +// Test transition from script to scriptscript. +#[ +#set text(size:20pt) +$ e^(e^(e^(e))) $ +] +A large number: $e^(e^(e^(e)))$. + +--- +// Test prime/double prime via scriptsize +#let prime = [ \u{2032} ] +#let dprime = [ \u{2033} ] +#let tprime = [ \u{2034} ] +$ y^dprime-2y^prime + y = 0 $ +$y^dprime-2y^prime + y = 0$ +$ y^tprime_3 + g^(prime 2) $ + +--- +// Test prime superscript on large symbol +$ scripts(sum_(k in NN))^prime 1/k^2 $ +$sum_(k in NN)^prime 1/k^2$ + +--- +// Test script-script in a fraction. +$ 1/(x^A) $ +#[#set text(size:18pt); $1/(x^A)$] vs. #[#set text(size:14pt); $x^A$] + -- cgit v1.2.3