diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-03-08 19:49:26 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-03-08 19:49:26 +0100 |
| commit | b71113d37a29bab5c7dc4b501c33ee9afbdb8213 (patch) | |
| tree | 9cab01b9e7f5930651d587473dc24468a4a5eaa1 /tests | |
| parent | d24c7030d819fd6c6e8e73663ddfe42047cca397 (diff) | |
Hyphenation
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/text/hyphenate.png | bin | 0 -> 4979 bytes | |||
| -rw-r--r-- | tests/ref/text/justify.png | bin | 11615 -> 11709 bytes | |||
| -rw-r--r-- | tests/typ/text/hyphenate.typ | 14 | ||||
| -rw-r--r-- | tests/typ/text/justify.typ | 11 |
4 files changed, 23 insertions, 2 deletions
diff --git a/tests/ref/text/hyphenate.png b/tests/ref/text/hyphenate.png Binary files differnew file mode 100644 index 00000000..050cab12 --- /dev/null +++ b/tests/ref/text/hyphenate.png diff --git a/tests/ref/text/justify.png b/tests/ref/text/justify.png Binary files differindex 26787af9..38141bdc 100644 --- a/tests/ref/text/justify.png +++ b/tests/ref/text/justify.png 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. |
