Class: Fontisan::Audit::CheckRegistry
- Inherits:
-
Object
- Object
- Fontisan::Audit::CheckRegistry
- Defined in:
- lib/fontisan/audit/check_registry.rb
Overview
Central registry of audit checks. A profile is a named subset of
checks (e.g. :ots, :structural). The :default profile runs
every registered check.
Profiles let callers opt into specific validation axes without
running everything — e.g. fontisan audit font.ttf --validate ots
runs only the OTS compatibility check.
Constant Summary collapse
- OT_TABLE_CHECKS =
Per-table OT conformance checks (axis 14 — full OT spec coverage).
%i[ot_head ot_hhea ot_maxp ot_os2 ot_name ot_post ot_kern ot_cff ot_glyf ot_layout].freeze
- PROFILES =
{ default: %i[table_directory glyph_names cmap ots_compatibility collection_integrity variable_font hinting woff2_validation format_round_trip opentype_conformance ot_head ot_hhea ot_maxp ot_os2 ot_name ot_post ot_kern ot_cff ot_glyf ot_layout], structural: %i[table_directory collection_integrity opentype_conformance], ots: %i[ots_compatibility], layout: %i[glyph_names cmap ot_layout], variable: %i[variable_font], hinting: %i[hinting], web: %i[ots_compatibility woff2_validation], spec: %i[opentype_conformance ot_head ot_hhea ot_maxp ot_os2 ot_name ot_post ot_kern ot_cff ot_glyf ot_layout], per_table: OT_TABLE_CHECKS, }.freeze
Class Method Summary collapse
-
.check_for(code) ⇒ Class?
The check class.
-
.for(profile) ⇒ Array<Class>
Check classes for the profile.
Class Method Details
.check_for(code) ⇒ Class?
Returns the check class.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fontisan/audit/check_registry.rb', line 49 def self.check_for(code) case code when :table_directory then Checks::TableDirectoryCheck when :glyph_names then Checks::GlyphNameCheck when :cmap then Checks::CmapCheck when :ots_compatibility then Checks::OtsCompatibilityCheck when :collection_integrity then Checks::CollectionIntegrityCheck when :variable_font then Checks::VariableFontCheck when :hinting then Checks::HintingCheck when :woff2_validation then Checks::Woff2ValidationCheck when :format_round_trip then Checks::FormatRoundTripCheck when :opentype_conformance then Checks::OpenTypeConformanceCheck when :ot_head then Checks::HeadCheck when :ot_hhea then Checks::HheaCheck when :ot_maxp then Checks::MaxpCheck when :ot_os2 then Checks::Os2Check when :ot_name then Checks::NameTableCheck when :ot_post then Checks::PostCheck when :ot_kern then Checks::KernCheck when :ot_cff then Checks::CffTableCheck when :ot_glyf then Checks::GlyfTableCheck when :ot_layout then Checks::LayoutTableCheck end end |