diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-12-27 20:45:20 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-12-27 20:45:20 +0100 |
| commit | ba3d43f7b2a18984be27f3d472884a19f3adce4c (patch) | |
| tree | 1c6ffa31145fb69c19319440969d2037b27b584f /src/library/style.rs | |
| parent | 750d220bb080be077cd7ede6d18d485b1c3fb0c9 (diff) | |
Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace
- "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
Diffstat (limited to 'src/library/style.rs')
| -rw-r--r-- | src/library/style.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/style.rs b/src/library/style.rs index 8b8d9f26..8571dac6 100644 --- a/src/library/style.rs +++ b/src/library/style.rs @@ -2,9 +2,9 @@ use std::rc::Rc; use fontdock::{FontStretch, FontStyle, FontWeight}; +use crate::color::{Color, RgbaColor}; use crate::eval::StringLike; use crate::geom::Linear; -use crate::color::{Color, RgbaColor}; use crate::prelude::*; /// `font`: Configure the font. @@ -13,7 +13,7 @@ use crate::prelude::*; /// - Font size (optional, `linear` relative to current font size). /// - Font families ... (optional, variadic, `Family`) /// -/// # Keyword arguments +/// # Named arguments /// - `style` (`Style`): The font style. /// - `weight` (`Weight`): The font weight. /// - `stretch` (`Stretch`): The font stretch. @@ -26,17 +26,17 @@ use crate::prelude::*; /// # Examples /// Set font size and font families. /// ```typst -/// [font: 12pt, "Arial", "Noto Sans", sans-serif] +/// [font 12pt, "Arial", "Noto Sans", sans-serif] /// ``` /// /// Redefine the default sans-serif family to a single font family. /// ```typst -/// [font: sans-serif="Source Sans Pro"] +/// [font sans-serif: "Source Sans Pro"] /// ``` /// /// Redefine the default emoji family with a fallback. /// ```typst -/// [font: emoji=("Segoe UI Emoji", "Noto Emoji")] +/// [font emoji: ("Segoe UI Emoji", "Noto Emoji")] /// ``` /// /// # Enumerations |
