diff --git a/src/library/text.rs b/src/library/text.rs index 0deda6e49..2816ea816 100644 --- a/src/library/text.rs +++ b/src/library/text.rs @@ -39,9 +39,9 @@ pub fn font(ctx: &mut EvalContext, args: &mut Args) -> TypResult { let style = args.named("style")?; let weight = args.named("weight")?; let stretch = args.named("stretch")?; + let fill = args.named("fill")?.or_else(|| args.eat()); let top_edge = args.named("top-edge")?; let bottom_edge = args.named("bottom-edge")?; - let fill = args.named("fill")?; let serif = args.named("serif")?; let sans_serif = args.named("sans-serif")?; let monospace = args.named("monospace")?; diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ index 9b60d51c3..3c8fcaf14 100644 --- a/tests/typ/text/font.typ +++ b/tests/typ/text/font.typ @@ -30,7 +30,7 @@ Emoji: 🐪, 🌋, 🏞 // Colors. [ #font(fill: eastern) - This is #font(fill: rgb("FA644B"))[way more] colorful. + This is #font(rgb("FA644B"))[way more] colorful. ] // Disable font fallback beyond the user-specified list.