diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-29 15:09:54 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-29 15:09:54 +0200 |
| commit | e4e79990dad90aea17ea99e54fcd60435927bb56 (patch) | |
| tree | 2e893ac5e104867629c2dad38502ef3fdc426d33 /tests | |
| parent | 411aba5b6f541f96bbdb4e23a40cf022a867dc11 (diff) | |
Allow body for font function once again
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/text/decorations.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/font.typ | 26 | ||||
| -rw-r--r-- | tests/typ/text/links.typ | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/typ/text/decorations.typ b/tests/typ/text/decorations.typ index 3f953b07..9cd7b096 100644 --- a/tests/typ/text/decorations.typ +++ b/tests/typ/text/decorations.typ @@ -13,7 +13,7 @@ #underline(red)[Critical information is conveyed here.] // Inherits font color. -[#font(fill: red) #underline[Change with the wind.]] +#font(fill: red, underline[Change with the wind.]) // Both over- and underline. #overline(underline[Running amongst the wolves.]) diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ index ecc07886..98643565 100644 --- a/tests/typ/text/font.typ +++ b/tests/typ/text/font.typ @@ -2,35 +2,35 @@ --- // Set same font size in three different ways. -[#font(22pt) A] -[#font(200%) A] -[#font(size: 16.5pt + 50%) A] +#font(22pt)[A] +#font(200%)[A] +#font(size: 16.5pt + 50%)[A] // Do nothing. -[#font() Normal] +#font()[Normal] // Set style (is available). -[#font(style: italic) Italic] +#font(style: italic)[Italic] // Set weight (is available). -[#font(weight: bold) Bold] +#font(weight: bold)[Bold] // Set stretch (not available, matching closest). -[#font(stretch: 50%) Condensed] +#font(stretch: 50%)[Condensed] // Set family. -[#font(family: "PT Sans") Sans serif] +#font(family: "PT Sans")[Sans serif] // Emoji. Emoji: 🐪, 🌋, 🏞 // Math. -[#font("Latin Modern Math") ∫ 𝛼 + 3𝛽 d𝑡] +#font("Latin Modern Math")[∫ 𝛼 + 3𝛽 d𝑡] // Colors. [ #font(fill: eastern) - This is [#font(fill: rgb("FA644B")) way more] colorful. + This is #font(fill: rgb("FA644B"))[way more] colorful. ] // Disable font fallback beyond the user-specified list. @@ -41,9 +41,9 @@ Emoji: 🐪, 🌋, 🏞 --- // Test class definitions. #font(sans-serif: "PT Sans") -[#font(family: sans-serif) Sans-serif.] \ -[#font(monospace) Monospace.] \ -[#font(monospace, monospace: ("Nope", "Latin Modern Math")) Math.] +#font(family: sans-serif)[Sans-serif.] \ +#font(monospace)[Monospace.] \ +#font(monospace, monospace: ("Nope", "Latin Modern Math"))[Math.] --- // Test top and bottom edge. diff --git a/tests/typ/text/links.typ b/tests/typ/text/links.typ index eabb316a..e6aa1d89 100644 --- a/tests/typ/text/links.typ +++ b/tests/typ/text/links.typ @@ -8,5 +8,5 @@ This link appears #link("https://google.com/")[in the middle of] a paragraph. // Styled with underline and color. -#let link(url, body) = link(url, [#font(fill: rgb("283663")) #underline(body)]) +#let link(url, body) = link(url, font(fill: rgb("283663"), underline(body))) You could also make the #link("https://html5zombo.com/")[link look way more typical.] |
