Add caching of swash rendering, significantly improves layout speed

This commit is contained in:
Jeremy Soller 2022-10-12 13:42:30 -06:00
parent 0b5050e601
commit a4959bbe7b
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
5 changed files with 243 additions and 92 deletions

View file

@ -68,10 +68,7 @@ impl<'a> FontMatches<'a> {
y_advance,
x_offset,
y_offset,
#[cfg(feature = "ab_glyph")]
font: &self.fonts[font_i].ab_glyph,
#[cfg(feature = "swash")]
font: &self.fonts[font_i].swash,
font: &self.fonts[font_i],
inner,
});
}