Class: Ucode::Audit::Extractors::Coverage
- Defined in:
- lib/ucode/audit/extractors/coverage.rb
Overview
Coverage fields: how many codepoints and glyphs the font ships, the compact codepoint-range view (default), and the optional flat per-codepoint list (only when ‘–all-codepoints` is on).
Returned fields:
total_codepoints, total_glyphs, cmap_subtables,
codepoint_ranges, codepoints
ucode delta vs fontisan: the ‘codepoints` field uses “U+XXXX” string form per `02-audit-schema-design.md`. Does NOT emit aggregations (blocks/scripts) — that’s the Aggregations extractor in TODO 10. Coverage only emits the raw codepoint set.
Instance Method Summary collapse
Instance Method Details
#extract(context) ⇒ Hash{Symbol=>Object}
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ucode/audit/extractors/coverage.rb', line 21 def extract(context) font = context.font codepoints = context.codepoints { total_codepoints: codepoints.length, total_glyphs: total_glyphs(font), cmap_subtables: cmap_subtable_formats(font), codepoint_ranges: CodepointRangeCoalescer.call(codepoints), codepoints: codepoints_for_report(context, codepoints), } end |