diff --git a/crates/texrra-tex-core/src/execution/device.rs b/crates/texrra-tex-core/src/execution/device.rs index c769c59..dcca751 100644 --- a/crates/texrra-tex-core/src/execution/device.rs +++ b/crates/texrra-tex-core/src/execution/device.rs @@ -174,7 +174,7 @@ impl NativeShipout { let y = self.device.vertical_origin + self.box_node.height + p.y; if let MathItem::OpenType(run) = p.item { run.paint(x, y, |value| value, |item, source| { - if !matches!(item, DisplayItem::OpenTypeActualText(_)) { + if !matches!(item, DisplayItem::OpenTypeActualText(_) | DisplayItem::OpenTypeColor(_)) { page.sources.insert(page.items.len(), source); } page.items.push(item); diff --git a/crates/texrra-tex-core/src/opentype.rs b/crates/texrra-tex-core/src/opentype.rs index 8576ffa..def9467 100644 --- a/crates/texrra-tex-core/src/opentype.rs +++ b/crates/texrra-tex-core/src/opentype.rs @@ -42,6 +42,8 @@ pub(crate) struct Request { slant: Option, #[serde(default, skip_serializing_if = "Option::is_none")] embolden: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + color: Option<[u8; 4]>, } fn read_decimal_prefix(value: &str) -> f64 { @@ -62,6 +64,21 @@ fn read_device_factor(value: &str, option: &str, identity: f32) -> Result