summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2022-05-31 22:56:08 +0200
committerMartin Haug <mhaug@live.de>2022-05-31 22:56:08 +0200
commit4e3036afcbdf2814889030413ffa81c8cc697341 (patch)
tree5a40018bb0fc39e726640184d988dcb0f2d3f86b /tests/typ
parent97858e5992a52459dd8a34be7a6b4786952b491a (diff)
Sub- and superscripts
Fixes to PDF export I guess Also improved rendition for non-Latin scripts
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/text/baseline.typ13
-rw-r--r--tests/typ/text/features.typ11
-rw-r--r--tests/typ/text/shifts.typ12
3 files changed, 21 insertions, 15 deletions
diff --git a/tests/typ/text/baseline.typ b/tests/typ/text/baseline.typ
index 5f451563..cd331c77 100644
--- a/tests/typ/text/baseline.typ
+++ b/tests/typ/text/baseline.typ
@@ -1,4 +1,9 @@
-// Test text baseline.
-
----
-Hi #text(1.5em)[You], #text(0.75em)[how are you?]
+// Test text baseline.
+
+---
+Hi #text(1.5em)[You], #text(0.75em)[how are you?]
+
+Our cockatoo was one of the
+#text(baseline: -0.2em)[#circle(radius: 2pt) first]
+#text(baseline: 0.2em)[birds #circle(radius: 2pt)]
+that ever learned to mimic a human voice.
diff --git a/tests/typ/text/features.typ b/tests/typ/text/features.typ
index 739230c9..070fdcdf 100644
--- a/tests/typ/text/features.typ
+++ b/tests/typ/text/features.typ
@@ -35,13 +35,6 @@ fi vs. #text(ligatures: false)[No fi]
#text(number-width: "tabular")[0123456789]
---
-// Test number position.
-#set text("IBM Plex Sans")
-#text(number-position: "normal")[C2H4] \
-#text(number-position: "subscript")[C2H4] \
-#text(number-position: "superscript")[C2H4]
-
----
// Test extra number stuff.
#set text("IBM Plex Sans")
0 vs. #text(slashed-zero: true)[0] \
@@ -66,9 +59,5 @@ fi vs. #text(features: (liga: 0))[No fi]
#set text(number-type: 2)
---
-// Error: 24-35 expected "lining" or "old-style"
-#set text(number-type: "different")
-
----
// Error: 21-26 expected array of strings or dictionary mapping tags to integers, found boolean
#set text(features: false)
diff --git a/tests/typ/text/shifts.typ b/tests/typ/text/shifts.typ
new file mode 100644
index 00000000..624db7e1
--- /dev/null
+++ b/tests/typ/text/shifts.typ
@@ -0,0 +1,12 @@
+// Test sub- and superscipt shifts.
+
+---
+#table(columns: 3,
+ [Typo.], [Fallb.], [Synth],
+ [x#super[1]], [x#super[5n]], [x#super[2 #square(width: 6pt)]],
+ [x#sub[1]], [x#sub[5n]], [x#sub[2 #square(width: 6pt)]],
+)
+
+---
+#set super(typographic: false, baseline: -0.25em, size: 0.7em)
+n#super[1], n#sub[2], ... n#super[N]