Class: Fontisan::Audit::Extractors::Coverage
- Defined in:
- lib/fontisan/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
Instance Method Summary collapse
Instance Method Details
#extract(context) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fontisan/audit/extractors/coverage.rb', line 14 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 |