Cache fonts

This commit is contained in:
Jeremy Soller 2022-10-25 15:47:55 -06:00
parent c60aaaf9d2
commit 324c8837fd
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
4 changed files with 46 additions and 23 deletions

View file

@ -829,8 +829,8 @@ impl<'a> TextBuffer<'a> {
"{}, {}: '{}' ('{}'): '{}' ({:?})",
self.cursor.line.get(),
self.cursor.index,
font_opt.map_or("?", |font| font.info.family.as_str()),
font_opt.map_or("?", |font| font.info.post_script_name.as_str()),
font_opt.as_ref().map_or("?", |font| font.info.family.as_str()),
font_opt.as_ref().map_or("?", |font| font.info.post_script_name.as_str()),
text_glyph,
text_glyph
);