2 Commits

Author SHA1 Message Date
d671ca8b6b Implement three key problems solutions for grid rendering
1. Problem 1 - Y-coordinate based row calculation:
   - Use Math.round(yCenter / cellHeight) instead of sequential filling
   - Each character placed at correct row based on actual position

2. Problem 2 - Empty column detection:
   - Implement detectEmptyColumns() method
   - Calculate standard column gap and detect large gaps
   - Map physical columns to grid columns accounting for empty columns

3. Problem 3 - Multi-column alignment baseline:
   - Add findTopMostY() helper method
   - Find reference baseline across all columns
   - (Currently simplified, can be optimized later)

4. Fix double-line small character pairing:
   - Use line_id sequence instead of x-coordinate splitting
   - First line_id = right column, second = left column
   - Pair by index after sorting by y-coordinate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 17:06:55 +08:00
1018416a7a Initial commit: Ancient OCR Viewer
- Canvas-based dual display (image + text)
- Grid rendering system with layout support
- Uniform font size rendering
- Double-line small character handling
- Comprehensive documentation of OCR rules and algorithms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:59:40 +08:00