Make font_matches accessible via function only
This commit is contained in:
parent
808e75a54d
commit
80e0a31188
1 changed files with 5 additions and 1 deletions
|
|
@ -237,7 +237,7 @@ impl TextBufferLine {
|
||||||
|
|
||||||
/// A buffer of text that is shaped and laid out
|
/// A buffer of text that is shaped and laid out
|
||||||
pub struct TextBuffer<'a> {
|
pub struct TextBuffer<'a> {
|
||||||
pub font_matches: FontMatches<'a>,
|
font_matches: FontMatches<'a>,
|
||||||
attrs: Attrs<'a>,
|
attrs: Attrs<'a>,
|
||||||
lines: Vec<TextBufferLine>,
|
lines: Vec<TextBufferLine>,
|
||||||
metrics: TextMetrics,
|
metrics: TextMetrics,
|
||||||
|
|
@ -507,6 +507,10 @@ impl<'a> TextBuffer<'a> {
|
||||||
self.height / self.metrics.line_height
|
self.height / self.metrics.line_height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn font_matches(&self) -> &FontMatches<'a> {
|
||||||
|
&self.font_matches
|
||||||
|
}
|
||||||
|
|
||||||
pub fn attrs(&self) -> &Attrs<'a> {
|
pub fn attrs(&self) -> &Attrs<'a> {
|
||||||
&self.attrs
|
&self.attrs
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue