From 39bc948e67ef6022ee31e23ce17dfc73614c49ac Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 4 Nov 2026 01:44:56 +0000 Subject: [PATCH] address review: keep the metrics box as a second hit test for Type 3 glyphs --- crates/redact/src/interp.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/redact/src/interp.rs b/crates/redact/src/interp.rs index 9b0dc842cb..ce2f608b40 100644 --- a/crates/redact/src/interp.rs +++ b/crates/redact/src/interp.rs @@ -696,11 +696,11 @@ fn show(scope: &Scope<'_>, gs: &Gs, tm: &mut Matrix, items: &[Object]) -> (Vec, gs: &Gs, tm: &mut Matrix, items: &[Object]) -> (Vec scope.glyph_hit(b, origin), + // (the metrics box is a second test: the union's overlap threshold is wider than a narrow glyph's own) + None => scope.glyph_hit(b, origin) || scope.glyph_hit(metrics, origin), }; glyphs.push(Glyph { bytes: pos..pos + len, advance, hit }); *tm = Matrix::translate(advance * gs.scale, 0.0).then(tm);