1 parent abdb50e commit 8ec7d35Copy full SHA for 8ec7d35
1 file changed
src/text_engine.rs
@@ -81,8 +81,16 @@ impl TextEngine {
81
/// [`FontContext::new`] finds nothing to resolve `monospace` against.
82
pub fn register_font(&mut self, data: Vec<u8>) -> Option<String> {
83
let blob = Blob::new(Arc::new(data) as Arc<dyn AsRef<[u8]> + Send + Sync>);
84
- let (family_id, _) = self.fcx.collection.register_fonts(blob, None).into_iter().next()?;
85
- self.fcx.collection.family_name(family_id).map(str::to_string)
+ let (family_id, _) = self
+ .fcx
86
+ .collection
87
+ .register_fonts(blob, None)
88
+ .into_iter()
89
+ .next()?;
90
+ self.fcx
91
92
+ .family_name(family_id)
93
+ .map(str::to_string)
94
}
95
96
/// The default font for a line: the configured family with a monospace fallback, or
0 commit comments