diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-29 13:45:59 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-29 13:49:50 +0200 |
| commit | 32a6b673bc4b73ade5863b0166c0779597cede5c (patch) | |
| tree | 7d32aa06c63052a759f7fc4d89bb551faeb258d0 /tests/typ/text | |
| parent | b89cd128ae118571efe8a5a5b40b9365e3007746 (diff) | |
Make use of wide calls
Diffstat (limited to 'tests/typ/text')
| -rw-r--r-- | tests/typ/text/basic.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/bidi.typ | 36 | ||||
| -rw-r--r-- | tests/typ/text/chinese.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/font.typ | 16 | ||||
| -rw-r--r-- | tests/typ/text/par.typ | 4 | ||||
| -rw-r--r-- | tests/typ/text/shaping.typ | 10 |
6 files changed, 35 insertions, 35 deletions
diff --git a/tests/typ/text/basic.typ b/tests/typ/text/basic.typ index d5f0de05..6e36a210 100644 --- a/tests/typ/text/basic.typ +++ b/tests/typ/text/basic.typ @@ -1,7 +1,7 @@ // Test simple text. --- -#page(width: 250pt, height: 110pt) +#page!(width: 250pt, height: 110pt) 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 diff --git a/tests/typ/text/bidi.typ b/tests/typ/text/bidi.typ index 2e7236ca..26099b91 100644 --- a/tests/typ/text/bidi.typ +++ b/tests/typ/text/bidi.typ @@ -3,54 +3,54 @@ --- // Test reordering with different top-level paragraph directions. #let text = [Text טֶקסט] -#font(family: ("EB Garamond", "Noto Serif Hebrew")) -#lang("he") {text} -#lang("de") {text} +#font!(family: ("EB Garamond", "Noto Serif Hebrew")) +#lang!("he") {text} +#lang!("de") {text} --- // Test that consecutive, embedded LTR runs stay LTR. // Here, we have two runs: "A" and italic "B". #let text = [أنت A_B_مطرC] -#font(family: ("EB Garamond", "Noto Sans Arabic")) -#lang("ar") {text} -#lang("de") {text} +#font!(family: ("EB Garamond", "Noto Sans Arabic")) +#lang!("ar") {text} +#lang!("de") {text} --- // Test that consecutive, embedded RTL runs stay RTL. // Here, we have three runs: "גֶ", bold "שֶׁ", and "ם". #let text = [Aגֶ*שֶׁ*םB] -#font(family: ("EB Garamond", "Noto Serif Hebrew")) -#lang("he") {text} -#lang("de") {text} +#font!(family: ("EB Garamond", "Noto Serif Hebrew")) +#lang!("he") {text} +#lang!("de") {text} --- // Test embedding up to level 4 with isolates. -#font(family: ("EB Garamond", "Noto Serif Hebrew", "Twitter Color Emoji")) -#lang(dir: rtl) +#font!(family: ("EB Garamond", "Noto Serif Hebrew", "Twitter Color Emoji")) +#lang!(dir: rtl) א\u{2066}A\u{2067}Bב\u{2069}? --- // Test hard line break (leads to two paragraphs in unicode-bidi). -#font(family: ("Noto Sans Arabic", "EB Garamond")) -#lang("ar") +#font!(family: ("Noto Sans Arabic", "EB Garamond")) +#lang!("ar") Life المطر هو الحياة \ الحياة تمطر is rain. --- // Test spacing. -#font(family: ("EB Garamond", "Noto Serif Hebrew")) +#font!(family: ("EB Garamond", "Noto Serif Hebrew")) L #h(1cm) ריווחR \ Lריווח #h(1cm) R --- // Test inline object. -#font(family: ("Noto Serif Hebrew", "EB Garamond")) -#lang("he") +#font!(family: ("Noto Serif Hebrew", "EB Garamond")) +#lang!("he") קרנפיםRh#image("../../res/rhino.png", height: 11pt)inoחיים --- // Test the `lang` function. // Ref: false -// Error: 12-15 must be horizontal -#lang(dir: ttb) +// Error: 13-16 must be horizontal +#lang!(dir: ttb) diff --git a/tests/typ/text/chinese.typ b/tests/typ/text/chinese.typ index 3fe790ea..2da3f1a1 100644 --- a/tests/typ/text/chinese.typ +++ b/tests/typ/text/chinese.typ @@ -1,7 +1,7 @@ // Test chinese text from Wikipedia. --- -#font(family: "Noto Serif CJK SC") +#font!(family: "Noto Serif CJK SC") 是美国广播公司电视剧《迷失》第3季的第22和23集,也是全剧的第71集和72集 由执行制作人戴蒙·林道夫和卡尔顿·库斯编剧,导演则是另一名执行制作人杰克·本德 diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ index f3a9495b..d6161c81 100644 --- a/tests/typ/text/font.typ +++ b/tests/typ/text/font.typ @@ -35,9 +35,9 @@ Emoji: 🐪, 🌋, 🏞 --- // Test top and bottom edge. -#page(width: 170pt) +#page!(width: 170pt) #let try(top, bottom) = rect(fill: conifer)[ - #font(top-edge: top, bottom-edge: bottom) + #font!(top-edge: top, bottom-edge: bottom) `From `#top` to `#bottom ] @@ -48,7 +48,7 @@ Emoji: 🐪, 🌋, 🏞 --- // Test class definitions. -#font(sans-serif: "PT Sans") +#font!(sans-serif: "PT Sans") #font(family: sans-serif)[Sans-serif.] \ #font(family: monospace)[Monospace.] \ #font(family: monospace, monospace: ("Nope", "Latin Modern Math"))[Math.] @@ -57,18 +57,18 @@ Emoji: 🐪, 🌋, 🏞 // Ref: false // Error: 7-12 unexpected argument -#font(false) +#font(false)[] // Error: 3:14-3:18 expected font style, found font weight // Error: 2:28-2:34 expected font weight, found string // Error: 1:43-1:44 expected string or array of strings, found integer -#font(style: bold, weight: "thin", serif: 0) +#font(style: bold, weight: "thin", serif: 0)[] // Warning: 15-19 should be between 100 and 900 -#font(weight: 2700) +#font(weight: 2700)[] // Warning: 16-21 should be between 50% and 200% -#font(stretch: 1000%) +#font(stretch: 1000%)[] // Error: 7-27 unexpected argument -#font(something: "invalid") +#font(something: "invalid")[] diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ index 4ce2f6f1..8aa1147d 100644 --- a/tests/typ/text/par.typ +++ b/tests/typ/text/par.typ @@ -2,11 +2,11 @@ --- // FIXME: Word spacing doesn't work due to new shaping process. -#par(spacing: 10pt, leading: 25%, word-spacing: 1pt) +#par!(spacing: 10pt, leading: 25%, word-spacing: 1pt) But, soft! what light through yonder window breaks? It is the east, and Juliet is the sun. --- // Test that it finishes an existing paragraph. -Hello #par(word-spacing: 0pt) t h e r e ! +Hello #par!(word-spacing: 0pt) t h e r e ! diff --git a/tests/typ/text/shaping.typ b/tests/typ/text/shaping.typ index 9c6f2966..98630ea9 100644 --- a/tests/typ/text/shaping.typ +++ b/tests/typ/text/shaping.typ @@ -7,11 +7,11 @@ Le fira // This should just shape nicely. -#font(family: "Noto Sans Arabic") +#font!(family: "Noto Sans Arabic") دع النص يمطر عليك // This should form a three-member family. -#font(family: "Twitter Color Emoji") +#font!(family: "Twitter Color Emoji") 👩👩👦 🤚🏿 // These two shouldn't be affected by a zero-width joiner. @@ -20,7 +20,7 @@ Le fira --- // Test font fallback. -#font(family: ("EB Garamond", "Noto Sans Arabic", "Twitter Color Emoji")) +#font!(family: ("EB Garamond", "Noto Sans Arabic", "Twitter Color Emoji")) // Font fallback for emoji. A😀B @@ -40,6 +40,6 @@ A🐈中文B --- // Test reshaping. -#font(family: "Noto Serif Hebrew") -#lang("he") +#font!(family: "Noto Serif Hebrew") +#lang!("he") ס \ טֶ |
