diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-08 21:42:36 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-08 21:42:36 +0200 |
| commit | 7e2c217cbc3805c4cae613baf4149cc82e10d503 (patch) | |
| tree | 66c36a7cff800bc0b6b4ddcd2e85112219cd830d /src/exec | |
| parent | 551e3af9d09a03aaa246cac46b98124bc10835ba (diff) | |
Rename some library arguments
- font
- color -> fill
- shorthands for families and size
- decoration functions
- color -> stroke
- strength -> thickness
- position -> offset
- invert offsets: now positive goes downwards just like the rest of typst
Diffstat (limited to 'src/exec')
| -rw-r--r-- | src/exec/state.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exec/state.rs b/src/exec/state.rs index 6f900b54..24e4b9f3 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -165,17 +165,17 @@ impl Default for FontState { /// Describes a line that could be positioned over, under or on top of text. #[derive(Debug, Copy, Clone, PartialEq, Hash)] pub struct LineState { + /// Stroke color of the line. Defaults to the text color if `None`. + pub stroke: Option<Fill>, /// Thickness of the line's stroke. Calling functions should attempt to /// read this value from the appropriate font tables if this is `None`. - pub strength: Option<Linear>, + pub thickness: Option<Linear>, /// Position of the line relative to the baseline. Calling functions should /// attempt to read this value from the appropriate font tables if this is /// `None`. - pub position: Option<Linear>, + pub offset: Option<Linear>, /// Amount that the line will be longer or shorter than its associated text. pub extent: Linear, - /// Color of the line. Will default to text color if `None`. - pub fill: Option<Fill>, } /// Font family definitions. |
