summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/text/hyphenate.pngbin0 -> 4979 bytes
-rw-r--r--tests/ref/text/justify.pngbin11615 -> 11709 bytes
-rw-r--r--tests/typ/text/hyphenate.typ14
-rw-r--r--tests/typ/text/justify.typ11
4 files changed, 23 insertions, 2 deletions
diff --git a/tests/ref/text/hyphenate.png b/tests/ref/text/hyphenate.png
new file mode 100644
index 00000000..050cab12
--- /dev/null
+++ b/tests/ref/text/hyphenate.png
Binary files differ
diff --git a/tests/ref/text/justify.png b/tests/ref/text/justify.png
index 26787af9..38141bdc 100644
--- a/tests/ref/text/justify.png
+++ b/tests/ref/text/justify.png
Binary files differ
diff --git a/tests/typ/text/hyphenate.typ b/tests/typ/text/hyphenate.typ
new file mode 100644
index 00000000..d6f44477
--- /dev/null
+++ b/tests/typ/text/hyphenate.typ
@@ -0,0 +1,14 @@
+// Test hyphenation.
+
+---
+#set page(width: 70pt)
+#set par(lang: "en", hyphenate: true)
+Warm welcomes to Typst.
+
+#h(6pt) networks, the rest.
+
+---
+#set page(width: 60pt)
+#set par(lang: "el", hyphenate: true)
+διαμερίσματα. \
+λατρευτός
diff --git a/tests/typ/text/justify.typ b/tests/typ/text/justify.typ
index 7b8a2829..eb8feb61 100644
--- a/tests/typ/text/justify.typ
+++ b/tests/typ/text/justify.typ
@@ -1,9 +1,16 @@
---
-#set par(indent: 14pt, spacing: 0pt, leading: 5pt, justify: true)
+#set page(width: 180pt)
+#set par(
+ lang: "en",
+ justify: true,
+ indent: 14pt,
+ spacing: 0pt,
+ leading: 5pt,
+)
This text is justified, meaning that spaces are stretched so that the text
-forms as "block" with flush edges at both sides.
+forms a "block" with flush edges at both sides.
First line indents and hyphenation play nicely with justified text.