Forgot about set_metrics

This commit is contained in:
notgull 2023-02-18 18:00:57 -08:00
parent c4ee3ba64e
commit 86d7ba959e

View file

@ -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();