Class: Ucode::Commands::UniversalSet::PreCheckCommand

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

Overview

ucode universal-set pre-check — standalone pre-build validation. Runs the three TODO 31 §Pre-build validation checks (config loads, fonts present, coverage assertion runs) without starting the 4-hour build.

Instance Method Summary collapse

Instance Method Details

#call(version, source_config_path: nil, cmaps: nil, font_locator: nil) ⇒ Ucode::Glyphs::UniversalSet::PreBuildReport

Parameters:

  • version (String)

    resolved UCD version

  • source_config_path (String, Pathname, nil) (defaults to: nil)
  • cmaps (#covers?) (defaults to: nil)

    injectable; defaults to RealFonts::CmapCache.

  • font_locator (#locate) (defaults to: nil)

    injectable; defaults to a fresh FontLocator.

Returns:

Raises:



155
156
157
158
159
160
161
162
163
164
# File 'lib/ucode/commands/universal_set.rb', line 155

def call(version, source_config_path: nil, cmaps: nil,
         font_locator: nil)
  database = Database.open(version)
  config_path = source_config_path || Glyphs::SourceConfig::DEFAULT_PATH

  kwargs = { source_config_path: config_path, database: database }
  kwargs[:cmaps] = cmaps if cmaps
  kwargs[:font_locator] = font_locator if font_locator
  Glyphs::UniversalSet::PreBuildCheck.new(**kwargs).call
end