From 6cb9fe9064a037224b6560b69b441b72e787fa94 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 19 Mar 2021 22:36:13 +0100 Subject: =?UTF-8?q?Text=20colors=20=F0=9F=A6=A9=20(#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/text.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/layout/text.rs') diff --git a/src/layout/text.rs b/src/layout/text.rs index 7faefa0d..7f8f97cc 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -24,6 +24,8 @@ pub struct TextNode { pub top_edge: VerticalFontMetric, /// The bottom end of the text bounding box. pub bottom_edge: VerticalFontMetric, + /// The glyph fill. + pub color: Fill, } impl Layout for TextNode { @@ -37,6 +39,7 @@ impl Layout for TextNode { self.font_size, self.top_edge, self.bottom_edge, + self.color, &mut ctx.env.fonts, ), self.aligns, -- cgit v1.2.3