Class: Fontisan::Audit::Checks::OpenTypeConformanceCheck

Inherits:
Fontisan::Audit::Check show all
Defined in:
lib/fontisan/audit/checks/opentype_conformance_check.rb

Overview

Foundational cross-table OpenType spec conformance checks. Per-table rules live in their own check modules (HeadCheck, HheaCheck, Os2Check, NameTableCheck, PostCheck, KernCheck) to keep each concern MECE.

This check owns the rules that span multiple tables:

- Required tables for each sfnt flavor (TTF vs CFF vs variable)
- head.indexToLocFormat consistency with loca table byte size
- hhea.numberOfHMetrics must be ≤ maxp.numGlyphs

Class Method Summary collapse

Methods inherited from Fontisan::Audit::Check

issue

Class Method Details

.call(font) ⇒ Array<Models::ValidationReport::Issue>

Parameters:

Returns:



21
22
23
24
25
26
27
# File 'lib/fontisan/audit/checks/opentype_conformance_check.rb', line 21

def self.call(font)
  issues = []
  issues.concat(validate_required_tables(font))
  issues.concat(validate_loca_format(font))
  issues.concat(validate_hhea_metrics(font))
  issues
end

.codeObject



29
30
31
# File 'lib/fontisan/audit/checks/opentype_conformance_check.rb', line 29

def self.code
  :opentype_conformance
end