Starting in AFDKO 5.0, all tools should be invoked through the unified afdko <command> interface:
afdko makeotf -r
afdko tx -dump font.otf
afdko spot myFont.otf
Individual command wrappers (e.g., makeotf, tx, spot) are deprecated and will be removed in future releases.
Commands are divided into two groups based on usage:
Less commonly used commands:
Commonly used, high-impact commands:
By default, deprecated wrappers work silently. Control behavior with:
AFDKO_WRAPPER_MODE environment variable:
off (default) - No warningswarn - Show deprecation warningserror - Treat deprecated wrappers as errorsExamples:
# Default behavior - no warnings
spot myFont.otf
# See deprecation warnings
export AFDKO_WRAPPER_MODE=warn
spot myFont.otf
# Shows: DeprecationWarning: The 'spot' command wrapper is deprecated...
# Test strict migration
export AFDKO_WRAPPER_MODE=error
spot myFont.otf
# Exits with error
# Suppress warnings (useful for CI)
export AFDKO_WRAPPER_MODE=off
# Or use Python standard:
export PYTHONWARNINGS=ignore
Recommended approach: Start using afdko <command> syntax now.
For scripts and automation:
afdko <command> syntax (future-proof)AFDKO_WRAPPER_MODE=off to silence warningsTesting your migration:
export AFDKO_WRAPPER_MODE=error
# Run your build scripts - any deprecated wrapper will cause an error
The deprecation will roll out in phases:
off)
warn)
AFDKO_WRAPPER_MODE=offafdko <command> interface remainsThe system is implemented in python/afdko/_deprecated.py and pyproject.toml:
pyproject.toml point to wrapper functions in _deprecated.pyAFDKO_WRAPPER_MODE, emits warnings if needed, then delegates to actual implementation_get_wrapper_mode() function reads environment variable with fallback to DEFAULT_WRAPPER_MODEdisabled/0 for off, 1 for warn, strict for errorPYTHONWARNINGS=ignore_format_early_warning() and _format_standard_warning() with different removal timelinesEARLY_COMMANDS set defines which commands get shorter timeline_check_error_mode() exits with error code 1 if mode is errorDEFAULT_WRAPPER_MODE constant to advance through rollout phasesmakeotfexe_wrapper() always shows informational message regardless of modeMain advantage: Single constant change (DEFAULT_WRAPPER_MODE) advances entire deprecation timeline through phases.