Forgot about set_metrics
This commit is contained in:
parent
c4ee3ba64e
commit
86d7ba959e
1 changed files with 1 additions and 0 deletions
|
|
@ -493,6 +493,7 @@ impl<'a> Buffer<'a> {
|
|||
/// Set the current [`Metrics`]
|
||||
pub fn set_metrics(&mut self, metrics: Metrics) {
|
||||
if metrics != self.metrics {
|
||||
assert_ne!(metrics.font_size, 0, "font size cannot be 0");
|
||||
self.metrics = metrics;
|
||||
self.relayout();
|
||||
self.shape_until_scroll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue