Class: Ucode::Commands::FontCoverageCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/ucode/commands/font_coverage.rb

Overview

‘ucode font-coverage` — audit named fonts against the Unicode 17 new-blocks table and emit per-font JSON coverage reports under `output/font_coverage/`.

Each font spec on the CLI is either a bare name (resolved via ‘Fontist::Font.find` then `install`) or `label=/path/to/font.ttf` (uses the local file directly). The label is what shows up in the audit JSON; the path is what gets audited.

Instance Method Summary collapse

Instance Method Details

#call(specs, output_root:, install: true) ⇒ Array<Result>

Parameters:

  • specs (Array<String>)

    font specs (see file docs).

  • output_root (Pathname, String)

    parent directory.

  • install (Boolean) (defaults to: true)

    allow fontist install on miss.

Returns:

  • (Array<Result>)


27
28
29
30
31
32
33
34
35
# File 'lib/ucode/commands/font_coverage.rb', line 27

def call(specs, output_root:, install: true)
  locator = Ucode::Glyphs::RealFonts::FontLocator.new
  auditor = Ucode::Glyphs::RealFonts::CoverageAuditor.new
  writer = Ucode::Glyphs::RealFonts::Writer.new(output_root)

  specs.map do |spec|
    audit_one(spec, locator, auditor, writer, install: install)
  end
end