summaryrefslogtreecommitdiff
path: root/src/exec
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec')
-rw-r--r--src/exec/context.rs1
-rw-r--r--src/exec/state.rs6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/exec/context.rs b/src/exec/context.rs
index 311619cc..761977fc 100644
--- a/src/exec/context.rs
+++ b/src/exec/context.rs
@@ -178,6 +178,7 @@ impl<'a> ExecContext<'a> {
font_size: self.state.font.font_size(),
top_edge: self.state.font.top_edge,
bottom_edge: self.state.font.bottom_edge,
+ color: self.state.font.color,
}
}
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)),
}
}
}