Skip to content

validate

Validate fonts for correctness.

Usage

bash
fontisan validate FONT [options]

Arguments

ArgumentDescription
FONTFont file to validate
FONT ...Multiple files

Options

OptionDescription
-t, --profile PROFILEValidation profile
-S, --summaryShow summary only
-T, --tableTable format output
--listList available profiles

Profiles

ProfileDescription
indexabilityFast font discovery
usabilityInstallation compatibility
productionComprehensive quality (default)
webWeb embedding readiness
spec_complianceFull spec compliance

Examples

Basic Validation

bash
fontisan validate font.ttf

# Font: font.ttf
# Status: VALID
#
# Summary:
#   Checks performed: 37
#   Passed: 37
#   Failed: 0

With Profile

bash
fontisan validate font.ttf -t web

# Font: font.ttf
# Profile: web
# Status: INVALID
#
# Summary:
#   Checks performed: 18
#   Passed: 17
#   Failed: 1
#
# Failed checks:
#   web_font_tables - Missing required GSUB table

Summary Only

bash
fontisan validate font.ttf -S

# font.ttf: VALID (37/37 checks passed)

Table Format

bash
fontisan validate font.ttf -T

# CHECK_ID            | STATUS | SEVERITY | TABLE
# --------------------------------------------------
# required_tables     | PASS   | error    | N/A
# name_version        | PASS   | error    | name
# family_name         | PASS   | error    | name
# head_magic          | PASS   | error    | head
# ...

Multiple Files

bash
fontisan validate fonts/*.ttf

# fonts/regular.ttf: VALID
# fonts/bold.ttf: VALID
# fonts/italic.ttf: INVALID (1 error)

List Profiles

bash
fontisan validate --list

# Available validation profiles:
#   indexability    - Fast validation for font discovery
#   usability       - Basic usability for installation
#   production      - Comprehensive quality checks
#   web             - Web embedding and optimization
#   spec_compliance - Full OpenType spec compliance

Exit Codes

CodeMeaning
0Valid
1Invalid (errors found)
2Error (file not found, etc.)

Use in Scripts

bash
# Validate before release
fontisan validate font.ttf -t production
if [ $? -eq 0 ]; then
  echo "Ready for release"
else
  echo "Validation failed"
  exit 1
fi

Fontisan is a [Ribose](https://open.ribose.com/) project