diff --git a/NOTICE b/NOTICE index 38935ea57..8253550b5 100644 --- a/NOTICE +++ b/NOTICE @@ -3,13 +3,14 @@ Licenses for third party components used by this project can be found below. ================================================================================ The SIL Open Font License Version 1.1 applies to: -* EB Garamond fonts in fonts/EBGaramond-*.ttf - Copyright 2017 The EB Garamond Project Authors - (https://github.com/octaviopardo/EBGaramond12) +* IBM Plex fonts in fonts/IBMPlex-*.ttf + Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" + (https://github.com/IBM/plex) -* Inconsolata fonts in fonts/Inconsolata-*.ttf - Copyright 2006 The Inconsolata Project Authors - (https://github.com/cyrealtype/Inconsolata) +* Noto fonts in fonts/Noto-*.ttf + Copyright 2018 The Noto Project Authors + (https://github.com/googlefonts/noto-fonts) + (https://github.com/googlefonts/noto-cjk) * PT Sans fonts in fonts/PTSans-*.ttf Copyright (c) 2010, ParaType Ltd. (http://www.paratype.com/public), diff --git a/benches/oneshot.rs b/benches/oneshot.rs index 2b3fb6ea3..dda3c5728 100644 --- a/benches/oneshot.rs +++ b/benches/oneshot.rs @@ -10,14 +10,12 @@ use typst::source::{SourceFile, SourceId}; use typst::Context; const SRC: &str = include_str!("bench.typ"); +const FONT: &[u8] = include_bytes!("../fonts/IBMPlexSans-Regular.ttf"); fn context() -> (Context, SourceId) { - let font = include_bytes!("../fonts/EBGaramond-Regular.ttf"); - let loader = MemLoader::new() - .with(Path::new("EBGaramond-Regular.ttf"), &font[..]) - .wrap(); + let loader = MemLoader::new().with(Path::new("font.ttf"), FONT).wrap(); let mut ctx = Context::new(loader); - let id = ctx.sources.provide(Path::new(""), SRC.to_string()); + let id = ctx.sources.provide(Path::new("src.typ"), SRC.to_string()); (ctx, id) } diff --git a/fonts/EBGaramond-Bold.ttf b/fonts/EBGaramond-Bold.ttf deleted file mode 100644 index f380a1c33..000000000 Binary files a/fonts/EBGaramond-Bold.ttf and /dev/null differ diff --git a/fonts/EBGaramond-BoldItalic.ttf b/fonts/EBGaramond-BoldItalic.ttf deleted file mode 100644 index a4678e1fa..000000000 Binary files a/fonts/EBGaramond-BoldItalic.ttf and /dev/null differ diff --git a/fonts/EBGaramond-Italic.ttf b/fonts/EBGaramond-Italic.ttf deleted file mode 100644 index a7201b00d..000000000 Binary files a/fonts/EBGaramond-Italic.ttf and /dev/null differ diff --git a/fonts/EBGaramond-Regular.ttf b/fonts/EBGaramond-Regular.ttf deleted file mode 100644 index f57146c95..000000000 Binary files a/fonts/EBGaramond-Regular.ttf and /dev/null differ diff --git a/fonts/IBMPlexMono-Regular.ttf b/fonts/IBMPlexMono-Regular.ttf new file mode 100644 index 000000000..ef3bc4b3d Binary files /dev/null and b/fonts/IBMPlexMono-Regular.ttf differ diff --git a/fonts/IBMPlexSans-Bold.ttf b/fonts/IBMPlexSans-Bold.ttf new file mode 100644 index 000000000..0e9eb07b1 Binary files /dev/null and b/fonts/IBMPlexSans-Bold.ttf differ diff --git a/fonts/IBMPlexSans-BoldItalic.ttf b/fonts/IBMPlexSans-BoldItalic.ttf new file mode 100644 index 000000000..07f8bc873 Binary files /dev/null and b/fonts/IBMPlexSans-BoldItalic.ttf differ diff --git a/fonts/IBMPlexSans-Italic.ttf b/fonts/IBMPlexSans-Italic.ttf new file mode 100644 index 000000000..9ef096feb Binary files /dev/null and b/fonts/IBMPlexSans-Italic.ttf differ diff --git a/fonts/IBMPlexSans-Regular.ttf b/fonts/IBMPlexSans-Regular.ttf new file mode 100644 index 000000000..f1c3da2fb Binary files /dev/null and b/fonts/IBMPlexSans-Regular.ttf differ diff --git a/fonts/IBMPlexSerif-Regular.ttf b/fonts/IBMPlexSerif-Regular.ttf new file mode 100644 index 000000000..7d6dc5c14 Binary files /dev/null and b/fonts/IBMPlexSerif-Regular.ttf differ diff --git a/fonts/Inconsolata-Bold.ttf b/fonts/Inconsolata-Bold.ttf deleted file mode 100644 index 9f9272588..000000000 Binary files a/fonts/Inconsolata-Bold.ttf and /dev/null differ diff --git a/fonts/Inconsolata-Regular.ttf b/fonts/Inconsolata-Regular.ttf deleted file mode 100644 index 457d262cf..000000000 Binary files a/fonts/Inconsolata-Regular.ttf and /dev/null differ diff --git a/src/eval/state.rs b/src/eval/state.rs index b6c0c9af8..a71ae39ad 100644 --- a/src/eval/state.rs +++ b/src/eval/state.rs @@ -110,8 +110,8 @@ pub struct ParState { impl Default for ParState { fn default() -> Self { Self { - par_spacing: Relative::new(1.0).into(), - line_spacing: Relative::new(0.5).into(), + par_spacing: Relative::new(1.2).into(), + line_spacing: Relative::new(0.65).into(), } } } @@ -235,12 +235,12 @@ pub struct FamilyState { impl Default for FamilyState { fn default() -> Self { Self { - list: Rc::new(vec![FontFamily::Serif]), - serif: Rc::new(vec!["eb garamond".into()]), - sans_serif: Rc::new(vec!["pt sans".into()]), - monospace: Rc::new(vec!["inconsolata".into()]), + list: Rc::new(vec![FontFamily::SansSerif]), + serif: Rc::new(vec!["ibm plex serif".into()]), + sans_serif: Rc::new(vec!["ibm plex sans".into()]), + monospace: Rc::new(vec!["ibm plex mono".into()]), base: Rc::new(vec![ - "eb garamond".into(), + "ibm plex sans".into(), "latin modern math".into(), "twitter color emoji".into(), ]), diff --git a/src/loading/fs.rs b/src/loading/fs.rs index fc49d6b53..34d8e9b5a 100644 --- a/src/loading/fs.rs +++ b/src/loading/fs.rs @@ -157,12 +157,12 @@ mod tests { paths.sort(); assert_eq!(paths, [ - Path::new("fonts/EBGaramond-Bold.ttf"), - Path::new("fonts/EBGaramond-BoldItalic.ttf"), - Path::new("fonts/EBGaramond-Italic.ttf"), - Path::new("fonts/EBGaramond-Regular.ttf"), - Path::new("fonts/Inconsolata-Bold.ttf"), - Path::new("fonts/Inconsolata-Regular.ttf"), + Path::new("fonts/IBMPlexMono-Regular.ttf"), + Path::new("fonts/IBMPlexSans-Bold.ttf"), + Path::new("fonts/IBMPlexSans-BoldItalic.ttf"), + Path::new("fonts/IBMPlexSans-Italic.ttf"), + Path::new("fonts/IBMPlexSans-Regular.ttf"), + Path::new("fonts/IBMPlexSerif-Regular.ttf"), Path::new("fonts/LatinModernMath.otf"), Path::new("fonts/NotoSansArabic-Regular.ttf"), Path::new("fonts/NotoSerifCJKsc-Regular.otf"), diff --git a/tests/ref/code/array.png b/tests/ref/code/array.png index c90898c13..752b23182 100644 Binary files a/tests/ref/code/array.png and b/tests/ref/code/array.png differ diff --git a/tests/ref/code/block.png b/tests/ref/code/block.png index afdd176b1..0a43919d5 100644 Binary files a/tests/ref/code/block.png and b/tests/ref/code/block.png differ diff --git a/tests/ref/code/call.png b/tests/ref/code/call.png index a6a7940ba..f5e197838 100644 Binary files a/tests/ref/code/call.png and b/tests/ref/code/call.png differ diff --git a/tests/ref/code/closure.png b/tests/ref/code/closure.png index 043d4a11d..17b4ef638 100644 Binary files a/tests/ref/code/closure.png and b/tests/ref/code/closure.png differ diff --git a/tests/ref/code/comment.png b/tests/ref/code/comment.png index e349b3842..c5dffd67b 100644 Binary files a/tests/ref/code/comment.png and b/tests/ref/code/comment.png differ diff --git a/tests/ref/code/dict.png b/tests/ref/code/dict.png index 7b7f4d8c4..09751ae8e 100644 Binary files a/tests/ref/code/dict.png and b/tests/ref/code/dict.png differ diff --git a/tests/ref/code/for.png b/tests/ref/code/for.png index 7178b594b..852fee49e 100644 Binary files a/tests/ref/code/for.png and b/tests/ref/code/for.png differ diff --git a/tests/ref/code/if.png b/tests/ref/code/if.png index bce70b899..65adcee21 100644 Binary files a/tests/ref/code/if.png and b/tests/ref/code/if.png differ diff --git a/tests/ref/code/import.png b/tests/ref/code/import.png index 00595f8ad..07140364e 100644 Binary files a/tests/ref/code/import.png and b/tests/ref/code/import.png differ diff --git a/tests/ref/code/include.png b/tests/ref/code/include.png index e14946432..62166c642 100644 Binary files a/tests/ref/code/include.png and b/tests/ref/code/include.png differ diff --git a/tests/ref/code/let.png b/tests/ref/code/let.png index 9805b8ee6..0753ae052 100644 Binary files a/tests/ref/code/let.png and b/tests/ref/code/let.png differ diff --git a/tests/ref/code/ops.png b/tests/ref/code/ops.png index 82e49c8f2..a5e06379e 100644 Binary files a/tests/ref/code/ops.png and b/tests/ref/code/ops.png differ diff --git a/tests/ref/code/repr.png b/tests/ref/code/repr.png index bc29db545..4e5ebb13e 100644 Binary files a/tests/ref/code/repr.png and b/tests/ref/code/repr.png differ diff --git a/tests/ref/code/while.png b/tests/ref/code/while.png index 0956fe458..e96caf958 100644 Binary files a/tests/ref/code/while.png and b/tests/ref/code/while.png differ diff --git a/tests/ref/coma.png b/tests/ref/coma.png index 2d067364a..d4c6c3def 100644 Binary files a/tests/ref/coma.png and b/tests/ref/coma.png differ diff --git a/tests/ref/insert/circle.png b/tests/ref/insert/circle.png index 7e44907bf..65b087edf 100644 Binary files a/tests/ref/insert/circle.png and b/tests/ref/insert/circle.png differ diff --git a/tests/ref/insert/ellipse.png b/tests/ref/insert/ellipse.png index 2e52b515c..d429f66e4 100644 Binary files a/tests/ref/insert/ellipse.png and b/tests/ref/insert/ellipse.png differ diff --git a/tests/ref/insert/image.png b/tests/ref/insert/image.png index 0a45e11b6..6848726f8 100644 Binary files a/tests/ref/insert/image.png and b/tests/ref/insert/image.png differ diff --git a/tests/ref/insert/rect.png b/tests/ref/insert/rect.png index 5f6df7b68..ad4c48e66 100644 Binary files a/tests/ref/insert/rect.png and b/tests/ref/insert/rect.png differ diff --git a/tests/ref/insert/square.png b/tests/ref/insert/square.png index 9ecadeeba..a7343a105 100644 Binary files a/tests/ref/insert/square.png and b/tests/ref/insert/square.png differ diff --git a/tests/ref/layout/containers.png b/tests/ref/layout/containers.png index 4548e2f5a..1ade12439 100644 Binary files a/tests/ref/layout/containers.png and b/tests/ref/layout/containers.png differ diff --git a/tests/ref/layout/grid-1.png b/tests/ref/layout/grid-1.png index f7dda520c..acec6f66d 100644 Binary files a/tests/ref/layout/grid-1.png and b/tests/ref/layout/grid-1.png differ diff --git a/tests/ref/layout/grid-2.png b/tests/ref/layout/grid-2.png index 368376630..e04fdadcc 100644 Binary files a/tests/ref/layout/grid-2.png and b/tests/ref/layout/grid-2.png differ diff --git a/tests/ref/layout/grid-3.png b/tests/ref/layout/grid-3.png index ec37e46e2..d2882f231 100644 Binary files a/tests/ref/layout/grid-3.png and b/tests/ref/layout/grid-3.png differ diff --git a/tests/ref/layout/grid-5.png b/tests/ref/layout/grid-5.png index 37666cc38..1b29e0bd0 100644 Binary files a/tests/ref/layout/grid-5.png and b/tests/ref/layout/grid-5.png differ diff --git a/tests/ref/layout/pad.png b/tests/ref/layout/pad.png index fa877d52c..cdf08c78f 100644 Binary files a/tests/ref/layout/pad.png and b/tests/ref/layout/pad.png differ diff --git a/tests/ref/layout/page.png b/tests/ref/layout/page.png index 42bcbe11e..71c3f18af 100644 Binary files a/tests/ref/layout/page.png and b/tests/ref/layout/page.png differ diff --git a/tests/ref/layout/pagebreak.png b/tests/ref/layout/pagebreak.png index b671605c6..043b50864 100644 Binary files a/tests/ref/layout/pagebreak.png and b/tests/ref/layout/pagebreak.png differ diff --git a/tests/ref/layout/spacing.png b/tests/ref/layout/spacing.png index c5a1bb806..bffa95075 100644 Binary files a/tests/ref/layout/spacing.png and b/tests/ref/layout/spacing.png differ diff --git a/tests/ref/markup/emph.png b/tests/ref/markup/emph.png index 7c07108a0..d05984064 100644 Binary files a/tests/ref/markup/emph.png and b/tests/ref/markup/emph.png differ diff --git a/tests/ref/markup/enums.png b/tests/ref/markup/enums.png index f9bc552bd..c1eee45de 100644 Binary files a/tests/ref/markup/enums.png and b/tests/ref/markup/enums.png differ diff --git a/tests/ref/markup/escape.png b/tests/ref/markup/escape.png index 227b1eebf..3f41a5164 100644 Binary files a/tests/ref/markup/escape.png and b/tests/ref/markup/escape.png differ diff --git a/tests/ref/markup/heading.png b/tests/ref/markup/heading.png index fc3ec906f..ca52644bb 100644 Binary files a/tests/ref/markup/heading.png and b/tests/ref/markup/heading.png differ diff --git a/tests/ref/markup/linebreak.png b/tests/ref/markup/linebreak.png index 06f4d5f45..4f3678f83 100644 Binary files a/tests/ref/markup/linebreak.png and b/tests/ref/markup/linebreak.png differ diff --git a/tests/ref/markup/lists.png b/tests/ref/markup/lists.png index 315905b8e..fef578ae1 100644 Binary files a/tests/ref/markup/lists.png and b/tests/ref/markup/lists.png differ diff --git a/tests/ref/markup/raw.png b/tests/ref/markup/raw.png index f7bb2ab0b..4da6a43e1 100644 Binary files a/tests/ref/markup/raw.png and b/tests/ref/markup/raw.png differ diff --git a/tests/ref/markup/shorthands.png b/tests/ref/markup/shorthands.png index 0a7e40643..aa6436ddc 100644 Binary files a/tests/ref/markup/shorthands.png and b/tests/ref/markup/shorthands.png differ diff --git a/tests/ref/markup/strong.png b/tests/ref/markup/strong.png index cc80690cb..6e2a84e1e 100644 Binary files a/tests/ref/markup/strong.png and b/tests/ref/markup/strong.png differ diff --git a/tests/ref/text/align.png b/tests/ref/text/align.png index 9415214b5..bde579230 100644 Binary files a/tests/ref/text/align.png and b/tests/ref/text/align.png differ diff --git a/tests/ref/text/basic.png b/tests/ref/text/basic.png index ef265cbf0..1a5a13091 100644 Binary files a/tests/ref/text/basic.png and b/tests/ref/text/basic.png differ diff --git a/tests/ref/text/bidi.png b/tests/ref/text/bidi.png index b90c6714d..db8f77ac6 100644 Binary files a/tests/ref/text/bidi.png and b/tests/ref/text/bidi.png differ diff --git a/tests/ref/text/chinese.png b/tests/ref/text/chinese.png index fa905df6b..c47a8a2f1 100644 Binary files a/tests/ref/text/chinese.png and b/tests/ref/text/chinese.png differ diff --git a/tests/ref/text/decorations.png b/tests/ref/text/decorations.png index b1e3171b9..0bcba75ad 100644 Binary files a/tests/ref/text/decorations.png and b/tests/ref/text/decorations.png differ diff --git a/tests/ref/text/font.png b/tests/ref/text/font.png index 2dfab8704..e194b00a9 100644 Binary files a/tests/ref/text/font.png and b/tests/ref/text/font.png differ diff --git a/tests/ref/text/linebreaks.png b/tests/ref/text/linebreaks.png index c5a826bd2..66697a899 100644 Binary files a/tests/ref/text/linebreaks.png and b/tests/ref/text/linebreaks.png differ diff --git a/tests/ref/text/links.png b/tests/ref/text/links.png index 5ac7ee000..2449880a6 100644 Binary files a/tests/ref/text/links.png and b/tests/ref/text/links.png differ diff --git a/tests/ref/text/par.png b/tests/ref/text/par.png index c37587387..fb493bd49 100644 Binary files a/tests/ref/text/par.png and b/tests/ref/text/par.png differ diff --git a/tests/ref/text/shaping.png b/tests/ref/text/shaping.png index 09f154ab3..565dcb7cd 100644 Binary files a/tests/ref/text/shaping.png and b/tests/ref/text/shaping.png differ diff --git a/tests/ref/text/whitespace.png b/tests/ref/text/whitespace.png index 764c7413d..f1421bfe3 100644 Binary files a/tests/ref/text/whitespace.png and b/tests/ref/text/whitespace.png differ diff --git a/tests/ref/utility/basics.png b/tests/ref/utility/basics.png index fd2760462..0ac0447b3 100644 Binary files a/tests/ref/utility/basics.png and b/tests/ref/utility/basics.png differ diff --git a/tests/typ/code/for.typ b/tests/typ/code/for.typ index 0785be71a..63dab9b88 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 8a9d0a300..83e003844 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 59abd5c70..23c5a43c6 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 9df5cd5ec..9d0c48bf2 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 d5f0de051..0c6c88965 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 078cb1f98..128e65d42 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 6457f7a7c..9b60d51c3 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 4d57834a1..5f886381c 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 8f8d39469..4b2236849 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 ba543e715..aa4e3c98c 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 aefdab340..e01b047c5 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_ diff --git a/tests/typeset.rs b/tests/typeset.rs index 25291cd78..778d8f6c6 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -62,9 +62,9 @@ fn main() { // We want to have "unbounded" pages, so we allow them to be infinitely // large and fit them to match their content. let mut state = State::default(); - let page = state.page_mut(); - page.size = Size::new(Length::pt(120.0), Length::inf()); - page.margins = Sides::splat(Some(Length::pt(10.0).into())); + state.page_mut().size = Size::new(Length::pt(120.0), Length::inf()); + state.page_mut().margins = Sides::splat(Some(Length::pt(10.0).into())); + state.font_mut().size = Length::pt(10.0); // Hook up an assert function into the global scope. let mut std = typst::library::new();