Skip to content

CLI Reference

Fontisan provides a comprehensive command-line interface for font processing tasks.

Font License Considerations

Commercial fonts often come with restrictive licenses that may prohibit:

  • Subsetting — Reducing the character set
  • Format conversion — Converting between TTF, OTF, WOFF, etc.
  • Variable font instancing — Generating static instances
  • Glyph modification — Altering or extracting individual glyphs
  • Redistribution — Sharing converted or modified fonts

Always check your font's End User License Agreement (EULA) before processing. Many foundries require additional licenses for web embedding, subsetting, or format conversion. Fontisan provides the tools — you are responsible for ensuring you have the rights to use them.

Quick Reference

Font Information Commands

CommandDescriptionExample
infoGet comprehensive font informationfontisan info font.ttf
lsList fonts in a collectionfontisan ls fonts.ttc
tablesShow font table informationfontisan tables font.ttf
glyphsList glyphs with names and IDsfontisan glyphs font.ttf
unicodeShow Unicode coveragefontisan unicode font.ttf
scriptsList supported scriptsfontisan scripts font.ttf
featuresList OpenType featuresfontisan features font.ttf
variableShow variable font axesfontisan variable font.ttf
optical-sizeShow optical size infofontisan optical-size font.ttf

Font Operations

CommandDescriptionExample
convertConvert between formatsfontisan convert input.ttf --to otf
subsetSubset fontsfontisan subset font.ttf --chars "ABC"
validateValidate fontsfontisan validate font.ttf
instanceGenerate variable font instancesfontisan instance var.ttf --wght 700
dump-tableExtract raw table datafontisan dump-table font.ttf head

Collection Operations

CommandDescriptionExample
packCreate font collectionsfontisan pack *.ttf -o fonts.ttc
unpackExtract from collectionsfontisan unpack fonts.ttc -d ./out

Export Operations

CommandDescriptionExample
exportExport to TTX, SVG, JSONfontisan export font.ttf --format ttx

Global Options

bash
fontisan [options] <command>

Options:
  --format FORMAT    Output format (text, yaml, json)
  --verbose          Verbose output
  --quiet            Suppress non-error output
  --help             Show help
  --version          Show version

Getting Help

bash
# General help
fontisan --help

# Command-specific help
fontisan convert --help
fontisan validate --help
fontisan instance --help

Output Formats

Most commands support multiple output formats:

bash
# Text (default)
fontisan info font.ttf

# YAML
fontisan info font.ttf --format yaml

# JSON
fontisan info font.ttf --format json

Common Workflows

Inspect a Font

bash
# Basic information
fontisan info font.ttf

# Detailed table listing
fontisan tables font.ttf

# See all glyphs
fontisan glyphs font.ttf

# Check Unicode coverage
fontisan unicode font.ttf

Convert for Web

bash
# Convert single font to WOFF2
fontisan convert font.ttf --to woff2 --output font.woff2

Work with Variable Fonts

bash
# Inspect variable font axes
fontisan variable VariableFont.ttf

# Generate a specific instance
fontisan instance VariableFont.ttf --wght 700 --output Bold.ttf

# Generate multiple instances
fontisan instance VariableFont.ttf --wght 400 --output Regular.ttf
fontisan instance VariableFont.ttf --wght 700 --output Bold.ttf

Work with Collections

bash
# List fonts in collection
fontisan ls fonts.ttc

# Extract all fonts
fontisan unpack fonts.ttc --output-dir ./extracted

# Extract and convert to web formats
fontisan unpack fonts.ttc --output-dir ./web --format woff2

# Create a collection
fontisan pack Regular.ttf Bold.ttf --output Family.ttc

Validate Fonts

bash
# Quick validation
fontisan validate font.ttf

# Validate for Google Fonts
fontisan validate font.ttf --profile google_fonts

# Strict validation
fontisan validate font.ttf --profile production

Export Font Data

bash
# Export to TTX (XML format)
fontisan export font.ttf --format ttx --output font.ttx

# Export to JSON
fontisan export font.ttf --format json --output font.json

# Export specific tables
fontisan export font.ttf --format ttx --tables head,name,cmap

Command Documentation

Detailed documentation for each command:

  • convert — Format conversion for individual fonts
  • info — Extract font metadata and properties
  • validate — Validate fonts against profiles
  • subset — Create font subsets
  • pack/unpack — Work with font collections
  • export — Export to TTX, SVG, and other formats
  • instance — Generate variable font instances
  • glyphs — List and inspect glyphs
  • tables — Inspect font tables

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