Class: Ucode::Glyphs::EmbeddedFonts::TraceRunner
- Inherits:
-
Object
- Object
- Ucode::Glyphs::EmbeddedFonts::TraceRunner
- Defined in:
- lib/ucode/glyphs/embedded_fonts/trace_runner.rb
Overview
Thin I/O wrapper around mutool trace <pdf> <page>.
Runs mutool on the given pages, captures the XML output,
delegates parsing to TraceParser, and returns a flat
Array<TraceGlyph> across all pages.
The only class in the trace pipeline that touches the filesystem / spawns subprocesses. Everything upstream (parser, correlator) is pure.
Instance Method Summary collapse
-
#initialize(pdf_path) ⇒ TraceRunner
constructor
A new instance of TraceRunner.
- #trace(page_numbers) ⇒ Array<TraceGlyph>
Constructor Details
#initialize(pdf_path) ⇒ TraceRunner
Returns a new instance of TraceRunner.
22 23 24 |
# File 'lib/ucode/glyphs/embedded_fonts/trace_runner.rb', line 22 def initialize(pdf_path) @pdf_path = Pathname.new(pdf_path) end |
Instance Method Details
#trace(page_numbers) ⇒ Array<TraceGlyph>
28 29 30 |
# File 'lib/ucode/glyphs/embedded_fonts/trace_runner.rb', line 28 def trace(page_numbers) page_numbers.flat_map { |page| trace_page(page) } end |