How focusring/horn works
Horn is a PDF/UA-1 and PDF/UA-2 accessibility validator. Its main workflow accepts PDF bytes or a file, parses the document and detects its standard, runs registered automated and manual-review checks, then presents findings in supported report formats. The check suite spans Matterhorn checkpoints, font-program analysis, and PDF/UA-2-specific rules. The README documents CLI use and output capabilities; source excerpts show the library validation path and check registration, but not CLI dispatch or report-writer invocation.
Main entry points: checks/mod.rs Check registry · lib.rs Validation API · font_program.rs Font checks · output/mod.rs Report writers
Components 17
Validation core
- Validation API
src/lib.rs - PDF document
src/document.rs - Check registry
src/checks/mod.rs
Accessibility checks
- Matterhorn coverage
src/matterhorn.rs - PDF/UA-2 rules
src/pdfua2.rs - General checks
src/checks - Structure checks
src/checks/annot_struct.rs - Font checks
src/checks/font_program.rs - Language checks
src/checks/language.rs - Table checks
src/checks/tables.rs - Manual review
src/checks/human_review.rs - UA-2 checks
src/checks/ua2/annotations.rs
PDF analysis
- Font parsers
src/fontprog/mod.rs - CMap analysis
src/content/cmap.rs
Findings and reports
- Report model
src/model.rs - Report writers
src/output/mod.rs
Other components
- PDF user
Connections 10
- PDF user → Validation API: requests validation
README.md - Validation API → PDF document: parses PDF
src/lib.rs - Validation API → Check registry: runs checks
src/lib.rs - Check registry → General checks: registers checks
src/checks/mod.rs - Check registry → UA-2 checks: registers checks
src/checks/mod.rs - Check registry → Report model: collects results
src/checks/mod.rs - Font checks → Font parsers: uses font analysis
src/checks/font_program.rs - Font checks → CMap analysis: uses CMaps
src/checks/font_program.rs - Report writers → Report model: formats reports
src/output/mod.rs - PDF user → Report writers: selects format
README.md