Make font_matches accessible via function only

This commit is contained in:
Jeremy Soller 2022-10-25 21:38:47 -06:00
parent 808e75a54d
commit 80e0a31188

View file

@ -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<TextBufferLine>,
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
}