From 80e0a311889ecb833566ce92ec31394c318d7848 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 25 Oct 2022 21:38:47 -0600 Subject: [PATCH] Make font_matches accessible via function only --- src/buffer.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }