diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-30 22:46:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-30 22:50:14 +0200 |
| commit | 2818ceee44a523308d83643b8d2f921b4a5e5d2e (patch) | |
| tree | 7578dd2e354e64c0265cc6e736828e5803d38762 /tests/typ | |
| parent | 30f302f7ffc464b41f1ac3b6d8fc6b4214835549 (diff) | |
New default fonts
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/code/for.typ | 4 | ||||
| -rw-r--r-- | tests/typ/code/include.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/grid-3.typ | 6 | ||||
| -rw-r--r-- | tests/typ/text/align.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/basic.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/bidi.typ | 14 | ||||
| -rw-r--r-- | tests/typ/text/font.typ | 10 | ||||
| -rw-r--r-- | tests/typ/text/linebreaks.typ | 4 | ||||
| -rw-r--r-- | tests/typ/text/par.typ | 7 | ||||
| -rw-r--r-- | tests/typ/text/shaping.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/whitespace.typ | 6 |
11 files changed, 32 insertions, 27 deletions
diff --git a/tests/typ/code/for.typ b/tests/typ/code/for.typ index 0785be71..63dab9b8 100644 --- a/tests/typ/code/for.typ +++ b/tests/typ/code/for.typ @@ -14,10 +14,10 @@ ] // Block body. -// Should output `[1st, 2nd, 3rd, 4th, 5th]`. +// Should output `[1st, 2nd, 3rd, 4th]`. { "[" - for v in (1, 2, 3, 4, 5) { + for v in (1, 2, 3, 4) { if v > 1 [, ] [#v] if v == 1 [st] diff --git a/tests/typ/code/include.typ b/tests/typ/code/include.typ index 8a9d0a30..83e00384 100644 --- a/tests/typ/code/include.typ +++ b/tests/typ/code/include.typ @@ -1,6 +1,8 @@ // Test include statements. --- +#page(width: 200pt) + = Document // Include a file diff --git a/tests/typ/layout/grid-3.typ b/tests/typ/layout/grid-3.typ index 59abd5c7..23c5a43c 100644 --- a/tests/typ/layout/grid-3.typ +++ b/tests/typ/layout/grid-3.typ @@ -5,9 +5,9 @@ #grid( columns: 2, gutter-rows: 3 * (8pt,), - [Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + [Lorem ipsum dolor sit amet. - Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis.], + Aenean commodo ligula eget dolor. Aenean massa. Penatibus et magnis.], [Text that is rather short], [Fireflies], [Critical], @@ -71,7 +71,7 @@ [foo], rect(height: 100%, width: 100%, fill: rgb("fc0030"))[Still no height], [bar], - [The nature of being itself is in question. Am I One? Am I Many? What is being alive?], + [The nature of being itself is in question. Am I One? What is being alive?], [baz], [The answer], [42], diff --git a/tests/typ/text/align.typ b/tests/typ/text/align.typ index 9df5cd5e..9d0c48bf 100644 --- a/tests/typ/text/align.typ +++ b/tests/typ/text/align.typ @@ -25,4 +25,4 @@ L #align(right)[R] \ L --- // FIXME: There should be a line break opportunity on alignment change. -LLLLLLLLLLLLL#align(center)[CCCC] +LLLLLLLLLLLLLLLLL#align(center)[CCCC] diff --git a/tests/typ/text/basic.typ b/tests/typ/text/basic.typ index d5f0de05..0c6c8896 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: 120pt) 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 078cb1f9..128e65d4 100644 --- a/tests/typ/text/bidi.typ +++ b/tests/typ/text/bidi.typ @@ -3,7 +3,7 @@ --- // Test reordering with different top-level paragraph directions. #let text = [Text טֶקסט] -#font("EB Garamond", "Noto Serif Hebrew") +#font(serif, "Noto Serif Hebrew") #lang("he") {text} #lang("de") {text} @@ -11,7 +11,7 @@ // Test that consecutive, embedded LTR runs stay LTR. // Here, we have two runs: "A" and italic "B". #let text = [أنت A_B_مطرC] -#font("EB Garamond", "Noto Sans Arabic") +#font(serif, "Noto Sans Arabic") #lang("ar") {text} #lang("de") {text} @@ -19,32 +19,32 @@ // Test that consecutive, embedded RTL runs stay RTL. // Here, we have three runs: "גֶ", bold "שֶׁ", and "ם". #let text = [Aגֶ*שֶׁ*םB] -#font("EB Garamond", "Noto Serif Hebrew") +#font(serif, "Noto Serif Hebrew") #lang("he") {text} #lang("de") {text} --- // Test embedding up to level 4 with isolates. -#font("EB Garamond", "Noto Serif Hebrew", "Twitter Color Emoji") +#font(serif, "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("Noto Sans Arabic", "EB Garamond") +#font("Noto Sans Arabic", serif) #lang("ar") Life المطر هو الحياة \ الحياة تمطر is rain. --- // Test spacing. -#font("EB Garamond", "Noto Serif Hebrew") +#font(serif, "Noto Serif Hebrew") L #h(1cm) ריווחR \ Lריווח #h(1cm) R --- // Test inline object. -#font("Noto Serif Hebrew", "EB Garamond") +#font("Noto Serif Hebrew", serif) #lang("he") קרנפיםRh#image("../../res/rhino.png", height: 11pt)inoחיים diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ index 6457f7a7..9b60d51c 100644 --- a/tests/typ/text/font.typ +++ b/tests/typ/text/font.typ @@ -2,9 +2,9 @@ --- // Set same font size in three different ways. -#font(22pt)[A] +#font(20pt)[A] #font(200%)[A] -#font(size: 16.5pt + 50%)[A] +#font(size: 15pt + 50%)[A] // Do nothing. #font()[Normal] @@ -19,7 +19,7 @@ #font(stretch: 50%)[Condensed] // Set family. -#font(family: "PT Sans")[Sans serif] +#font(family: serif)[Serif] // Emoji. Emoji: 🐪, 🌋, 🏞 @@ -48,7 +48,9 @@ Emoji: 🐪, 🌋, 🏞 --- // Test top and bottom edge. -#page(width: 170pt) +#page(width: 150pt) +#font(size: 8pt) + #let try(top, bottom) = rect(fill: conifer)[ #font(top-edge: top, bottom-edge: bottom) `From `#top` to `#bottom diff --git a/tests/typ/text/linebreaks.typ b/tests/typ/text/linebreaks.typ index 4d57834a..5f886381 100644 --- a/tests/typ/text/linebreaks.typ +++ b/tests/typ/text/linebreaks.typ @@ -2,7 +2,7 @@ --- // Test overlong word that is not directly after a hard break. -This is a spaceexceedinglylongishy. +This is a spaceexceedinglylongy. --- // Test two overlong words in a row. @@ -10,7 +10,7 @@ Supercalifragilisticexpialidocious Expialigoricmetrioxidation. --- // Test that there are no unwanted line break opportunities on run change. -This is partly emph_as_ized. +This is partly emp_has_ized. --- Hard \ break. diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ index 8f8d3946..4b223684 100644 --- a/tests/typ/text/par.typ +++ b/tests/typ/text/par.typ @@ -1,7 +1,8 @@ // Test configuring paragraph properties. --- -#par(spacing: 10pt, leading: 25%) +#par(spacing: 100%, leading: 0pt) -But, soft! what light through yonder window breaks? It is the east, and Juliet -is the sun. +But, soft! what light through yonder window breaks? + +It is the east, and Juliet is the sun. diff --git a/tests/typ/text/shaping.typ b/tests/typ/text/shaping.typ index ba543e71..aa4e3c98 100644 --- a/tests/typ/text/shaping.typ +++ b/tests/typ/text/shaping.typ @@ -20,7 +20,7 @@ Le fira --- // Test font fallback. -#font("EB Garamond", "Noto Sans Arabic", "Twitter Color Emoji") +#font(sans-serif, "Noto Sans Arabic", "Twitter Color Emoji") // Font fallback for emoji. A😀B diff --git a/tests/typ/text/whitespace.typ b/tests/typ/text/whitespace.typ index aefdab34..e01b047c 100644 --- a/tests/typ/text/whitespace.typ +++ b/tests/typ/text/whitespace.typ @@ -30,11 +30,11 @@ A #for _ in (none,) {"B"}C --- // Test that a run consisting only of whitespace isn't trimmed. -A[#font("PT Sans") ]B +A[#font(serif) ]B --- // Test font change after space. -Left [#font("PT Sans")Right]. +Left [#font(serif)Right]. --- // Test that space at start of line is not trimmed. @@ -42,4 +42,4 @@ A{"\n"} B --- // Test that trailing space does not force a line break. -LLLLLLLLLLLLLL R _L_ +LLLLLLLLLLLLLLLLLL R _L_ |
