From 5590c3c0d3bc24dbdf6a9e6cefa3f50180274a51 Mon Sep 17 00:00:00 2001 From: Alex-Gilbert Date: Tue, 17 Feb 2026 12:14:43 -0600 Subject: [PATCH] fix: pass page image to detect_font_for_line in analysis Co-Authored-By: Claude Opus 4.6 --- unredact/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unredact/app.py b/unredact/app.py index 012a717..ff03288 100644 --- a/unredact/app.py +++ b/unredact/app.py @@ -160,7 +160,7 @@ def _run_analysis(page_img: Image.Image, rx: int, ry: int, rw: int, rh: int) -> redaction_cy = (ry - crop_y1) + rh / 2 best_line = min(lines, key=lambda l: abs((l.y + l.h / 2) - redaction_cy)) - font_match = detect_font_for_line(best_line) + font_match = detect_font_for_line(best_line, line_crop) segments = [] gap = {"x": rx, "w": rw}