diff options
| author | Martin <mhaug@live.de> | 2021-03-19 22:36:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-19 22:36:13 +0100 |
| commit | 6cb9fe9064a037224b6560b69b441b72e787fa94 (patch) | |
| tree | 9a5474758e37199c7a01c6d22383ede225deab4d /src/exec/state.rs | |
| parent | 898dc38ec153709929d2513fb9d040dd2c1ce0fe (diff) | |
Text colors 🦩 (#18)
Diffstat (limited to 'src/exec/state.rs')
| -rw-r--r-- | src/exec/state.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/exec/state.rs b/src/exec/state.rs index 6775f394..f66694fd 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -2,8 +2,9 @@ use std::rc::Rc; use fontdock::{fallback, FallbackTree, FontStretch, FontStyle, FontVariant, FontWeight}; +use crate::color::{Color, RgbaColor}; use crate::geom::*; -use crate::layout::VerticalFontMetric; +use crate::layout::{Fill, VerticalFontMetric}; use crate::paper::{Paper, PaperClass, PAPER_A4}; /// The evaluation state. @@ -115,6 +116,8 @@ pub struct FontState { /// Whether the emphasis toggle is active or inactive. This determines /// whether the next `_` makes italic or non-italic. pub emph: bool, + /// The glyph fill color / texture. + pub color: Fill, } impl FontState { @@ -149,6 +152,7 @@ impl Default for FontState { scale: Linear::ONE, strong: false, emph: false, + color: Fill::Color(Color::Rgba(RgbaColor::BLACK)), } } } |
