summaryrefslogtreecommitdiffstats
path: root/wgpu/src/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-09 11:21:32 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-09 11:21:32 +0200
commit3450987355be7fe029db112474d06613929b54c7 (patch)
tree1d2186d822add1becdd5c942cc6a6c67e5437b57 /wgpu/src/text.rs
parent837529bc995a728300c61fc102474cc31f7a6500 (diff)
downloadiced-3450987355be7fe029db112474d06613929b54c7.tar.gz
iced-3450987355be7fe029db112474d06613929b54c7.tar.bz2
iced-3450987355be7fe029db112474d06613929b54c7.zip
Invalidate existing paragraphs when new fonts are loaded
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r--wgpu/src/text.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs
index a1ec511b..bd4f3e06 100644
--- a/wgpu/src/text.rs
+++ b/wgpu/src/text.rs
@@ -7,7 +7,6 @@ use crate::layer::Text;
use std::borrow::Cow;
use std::cell::RefCell;
-use std::sync::Arc;
#[allow(missing_debug_implementations)]
pub struct Pipeline {
@@ -47,9 +46,7 @@ impl Pipeline {
}
pub fn load_font(&mut self, bytes: Cow<'static, [u8]>) {
- let _ = self.font_system.get_mut().db_mut().load_font_source(
- glyphon::fontdb::Source::Binary(Arc::new(bytes.into_owned())),
- );
+ self.font_system.load_font(bytes);
self.cache = RefCell::new(Cache::new());
}