summaryrefslogtreecommitdiff
path: root/src/export
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-09-19 11:14:58 +0200
committerLaurenz <laurmaedje@gmail.com>2022-09-19 11:16:05 +0200
commit4ec3bcee487c1567bc6551f81d4f69eee4379076 (patch)
tree84ece5a894679adbe06c43712af685c5561a83ca /src/export
parente5f958b92161732ae46ccc66ce3d6eea213cf925 (diff)
Remove pins and memoization
Diffstat (limited to 'src/export')
-rw-r--r--src/export/render.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/export/render.rs b/src/export/render.rs
index 4933edf0..afa6d3da 100644
--- a/src/export/render.rs
+++ b/src/export/render.rs
@@ -246,16 +246,8 @@ fn render_outline_glyph(
// Rasterize the glyph with `pixglyph`.
// Try to retrieve a prepared glyph or prepare it from scratch if it
// doesn't exist, yet.
- let bitmap = crate::memo::memoized_ref(
- (&ctx.fonts, text.face_id, id),
- |(fonts, face_id, id)| {
- (
- pixglyph::Glyph::load(fonts.get(face_id).ttf(), id),
- ((), (), ()),
- )
- },
- |glyph| glyph.as_ref().map(|g| g.rasterize(ts.tx, ts.ty, ppem)),
- )?;
+ let glyph = pixglyph::Glyph::load(ctx.fonts.get(text.face_id).ttf(), id)?;
+ let bitmap = glyph.rasterize(ts.tx, ts.ty, ppem);
let cw = canvas.width() as i32;
let ch = canvas.height() as i32;