Skip to content

convert

Convert between font formats.

Usage

bash
fontisan convert INPUT --to FORMAT [options]

Arguments

ArgumentDescription
INPUTInput font file
--to FORMATOutput format (ttf, otf, woff, woff2)
--output PATHOutput file path

Options

Opening Options

OptionDescription
--decomposeDecompose composite glyphs
--convert-curvesConvert quadratic ↔ cubic curves
--scale-to-1000Scale to 1000 UPM
--autohintApply automatic hinting
--generate-unicodeGenerate Unicode from glyph names
--preserve-custom-tablesPreserve non-standard tables

Generating Options

OptionDescription
--hinting-mode MODEpreserve, auto, none, full
--optimize-tablesEnable table optimization
--preserve-metadataKeep copyright/license info
--strip-metadataRemove metadata
--target-format FORMATCollection target format

Presets

OptionDescription
--preset NAMEUse named preset
--show-optionsShow recommended options

Presets

PresetDescription
type1_to_modernType 1 → OpenType
modern_to_type1OpenType → Type 1
web_optimizedAny → WOFF2
archive_to_modernCollection → OTF

Examples

Basic Conversion

bash
# TTF to OTF
fontisan convert input.ttf --to otf --output output.otf

# OTF to WOFF2
fontisan convert input.otf --to woff2 --output output.woff2

With Options

bash
# Convert with autohint
fontisan convert input.ttf --to otf --autohint --output output.otf

# Convert with curve conversion
fontisan convert input.ttf --to otf --convert-curves --output output.otf

Using Presets

bash
# Type 1 to modern
fontisan convert font.pfb --to otf --preset type1_to_modern --output font.otf

# Web optimized
fontisan convert font.otf --to woff2 --preset web_optimized --output font.woff2

Show Options

bash
# See what options will be used
fontisan convert input.ttf --to otf --show-options

Batch Conversion

bash
# Convert all TTF files
for f in *.ttf; do
  fontisan convert "$f" --to woff2 --output "${f%.ttf}.woff2"
done

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