fix: einheitliche Schriftgroesse + Border-Cluster-Filter im Overlay
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 35s
CI / test-go-edu-search (push) Successful in 31s
CI / test-python-klausur (push) Failing after 2m24s
CI / test-python-agent-core (push) Successful in 25s
CI / test-nodejs-website (push) Successful in 25s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 35s
CI / test-go-edu-search (push) Successful in 31s
CI / test-python-klausur (push) Failing after 2m24s
CI / test-python-agent-core (push) Successful in 25s
CI / test-nodejs-website (push) Successful in 25s
1. Schriftgroesse basiert jetzt auf Median-Zeilenhoehe statt individueller Zellhoehe — keine Groessensprunge in Box-Bereichen 2. Sehr schmale Pixel-Cluster (< 0.5% Zellbreite) werden gefiltert, damit Box-Rahmen nicht als Textposition erkannt werden Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,11 @@ export function usePixelWordPositions(
|
||||
|
||||
if (clusters.length === 0) continue
|
||||
|
||||
// Filter out very narrow clusters (likely box borders / vertical lines)
|
||||
const minClusterW = Math.max(3, Math.round(cw * 0.005))
|
||||
clusters = clusters.filter(c => (c.end - c.start + 1) > minClusterW)
|
||||
if (clusters.length === 0) continue
|
||||
|
||||
if (rotation === 180) {
|
||||
clusters = clusters.map(c => ({
|
||||
start: cw - 1 - c.end,
|
||||
|
||||
Reference in New Issue
Block a user