diff --git a/src/buffer.rs b/src/buffer.rs index 3b838b1..7fa9636 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -237,7 +237,7 @@ impl TextBufferLine { /// A buffer of text that is shaped and laid out pub struct TextBuffer<'a> { - pub font_matches: FontMatches<'a>, + font_matches: FontMatches<'a>, attrs: Attrs<'a>, lines: Vec, metrics: TextMetrics, @@ -507,6 +507,10 @@ impl<'a> TextBuffer<'a> { self.height / self.metrics.line_height } + pub fn font_matches(&self) -> &FontMatches<'a> { + &self.font_matches + } + pub fn attrs(&self) -> &Attrs<'a> { &self.attrs }