summaryrefslogtreecommitdiff
path: root/tests/typ/text
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-24 17:12:34 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-24 17:12:34 +0100
commit73615f7e3ce23f2ea656d04ea9f96184f5ebdc0a (patch)
tree7691b792e1e4b33469a72c40fc76854f1de0814e /tests/typ/text
parent6720520ec06dd0718f81049b2b11e81664f7ef62 (diff)
Text shaping πŸš€
- Shapes text with rustybuzz - Font fallback with family list - Tofus are shown in the first font Co-Authored-By: Martin <mhaug@live.de>
Diffstat (limited to 'tests/typ/text')
-rw-r--r--tests/typ/text/basic.typ19
-rw-r--r--tests/typ/text/complex.typ38
2 files changed, 57 insertions, 0 deletions
diff --git a/tests/typ/text/basic.typ b/tests/typ/text/basic.typ
new file mode 100644
index 00000000..b424cee8
--- /dev/null
+++ b/tests/typ/text/basic.typ
@@ -0,0 +1,19 @@
+// Test simple text.
+
+#page(width: 250pt)
+
+But, soft! what light through yonder window breaks? It is the east, and Juliet
+is the sun. Arise, fair sun, and kill the envious moon, Who is already sick and
+pale with grief, That thou her maid art far more fair than she: Be not her maid,
+since she is envious; Her vestal livery is but sick and green And none but fools
+do wear it; cast it off. It is my lady, O, it is my love! O, that she knew she
+were! She speaks yet she says nothing: what of that? Her eye discourses; I will
+answer it.
+
+I am too bold, 'tis not to me she speaks: Two of the fairest stars in all the
+heaven, Having some business, do entreat her eyes To twinkle in their spheres
+till they return. What if her eyes were there, they in her head? The brightness
+of her cheek would shame those stars, As daylight doth a lamp; her eyes in
+heaven Would through the airy region stream so bright That birds would sing and
+think it were not night. See, how she leans her cheek upon her hand! O, that I
+were a glove upon that hand, That I might touch that cheek!
diff --git a/tests/typ/text/complex.typ b/tests/typ/text/complex.typ
new file mode 100644
index 00000000..567a208d
--- /dev/null
+++ b/tests/typ/text/complex.typ
@@ -0,0 +1,38 @@
+// Test complex text shaping.
+
+---
+// Test ligatures.
+
+// This should create an "fi" ligature.
+Le fira
+
+// This should just shape nicely.
+#font("Noto Sans Arabic")
+Ω…Ω†Ψ΄ Ψ₯Ω„Ψ§ Ψ¨Ψ³Ω… Ψ§Ω„Ω„Ω‡
+
+// This should form a three-member family.
+#font("Twitter Color Emoji")
+πŸ‘©β€πŸ‘©β€πŸ‘¦ 🀚🏿
+
+// These two shouldn't be affected by a zero-width joiner.
+πŸžβ€πŸŒ‹
+
+---
+// Test font fallback.
+
+#font("EB Garamond", "Noto Sans Arabic", "Twitter Color Emoji")
+
+// Font fallback for emoji.
+AπŸ˜€B
+
+// Font fallback for entire text.
+Ω…Ω†Ψ΄ Ψ₯Ω„Ψ§ Ψ¨Ψ³Ω… Ψ§Ω„Ω„Ω‡
+
+// Font fallback in right-to-left text.
+Ψ¨πŸˆπŸ˜€Ψ³Ω…
+
+// Multi-layer font fallback.
+AΨ¨πŸ˜€πŸžΨ³Ω…B
+
+// Tofus are rendered with the first font.
+AπŸˆδΈ­ζ–‡B