summaryrefslogtreecommitdiff
path: root/tests/typ/text
diff options
context:
space:
mode:
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