Migrate from Font-Validator
This guide helps you migrate from Microsoft's Font-Validator (C#) to Fontisan.
Overview
Font-Validator is Microsoft's C# tool for font validation. Fontisan provides equivalent validation with additional features, all in pure Ruby.
Profile Equivalents
| Font-Validator | Fontisan |
|---|---|
| Auto mode | fontisan validate -t indexability |
| Full mode | fontisan validate -t production |
| Web mode | fontisan validate -t web |
| Custom | fontisan validate -t spec_compliance |
Validation Profiles
indexability (Fast)
Equivalent to Font-Validator Auto mode:
bash
fontisan validate font.ttf -t indexability
# Fast validation for font discovery
# 8 checks, metadata-onlyproduction (Full)
Equivalent to Font-Validator Full mode:
bash
fontisan validate font.ttf -t production
# Comprehensive quality checks
# 37 checks, OpenType spec compliance
# This is the default profileweb
Equivalent to Font-Validator Web mode:
bash
fontisan validate font.ttf -t web
# Web embedding readiness
# 18 checks for web deploymentCommand Equivalents
Basic Validation
Font-Validator:
bash
FontValidator.exe font.ttfFontisan:
bash
fontisan validate font.ttfWith Profile
Font-Validator:
bash
FontValidator.exe -Profile Auto font.ttf
FontValidator.exe -Profile Full font.ttf
FontValidator.exe -Profile Web font.ttfFontisan:
bash
fontisan validate font.ttf -t indexability
fontisan validate font.ttf -t production
fontisan validate font.ttf -t webOutput Format
Font-Validator:
bash
FontValidator.exe -Output report.xml font.ttfFontisan:
bash
fontisan validate font.ttf --format yaml
fontisan validate font.ttf --format jsonOutput Comparison
Font-Validator Output
=== Font Validation Report ===
File: font.ttf
Overall: PASS
Checks: 50
Passed: 50
Failed: 0Fontisan Output
Font: font.ttf
Status: VALID
Summary:
Checks performed: 37
Passed: 37
Failed: 0
Errors: 0
Warnings: 0Validation Helpers
Fontisan includes 56 validation helpers:
| Category | Helpers |
|---|---|
| Table | 12 |
| Name | 8 |
| Head | 6 |
| Metrics | 10 |
| Glyph | 8 |
| CMAP | 6 |
| Layout | 6 |
See Validation Helpers for details.
Additional Features
Fontisan provides features not available in Font-Validator:
Font Conversion
bash
# Not available in Font-Validator
fontisan convert font.ttf --to otf --output font.otf
fontisan convert font.ttf --to woff2 --output font.woff2Font Subsetting
bash
# Not available in Font-Validator
fontisan subset font.ttf --chars "ABC" --output subset.ttfCollection Support
bash
# Limited in Font-Validator
fontisan ls family.ttc
fontisan unpack family.ttc --output-dir ./extractedVariable Font Support
bash
# Limited in Font-Validator
fontisan info variable.ttf
fontisan instance variable.ttf --wght 700 --output bold.ttfFeature Comparison
| Feature | Font-Validator | Fontisan |
|---|---|---|
| Pure Ruby | ❌ (C#) | ✅ |
| .NET required | ✅ | ❌ |
| Validation | ✅ | ✅ |
| Conversion | ❌ | ✅ |
| Subsetting | ❌ | ✅ |
| Collections | Limited | ✅ |
| Variable fonts | Limited | ✅ |
| Type 1 support | ❌ | ✅ |
| Custom validators | ❌ | ✅ |
Migration Example
CI/CD Pipeline
Before (Font-Validator):
yaml
# Requires .NET runtime
- run: FontValidator.exe -Profile Full fonts/*.ttfAfter (Fontisan):
yaml
# Pure Ruby, no runtime dependencies
- run: fontisan validate fonts/*.ttf -t productionScript
Before:
bash
# Windows only
FontValidator.exe -Profile Full font.ttf
if %ERRORLEVEL% neq 0 (
echo Validation failed
)After:
bash
# Cross-platform
fontisan validate font.ttf
if [ $? -ne 0 ]; then
echo "Validation failed"
fiCustom Validators
Fontisan allows custom validation rules:
ruby
class MyValidator < Fontisan::Validators::Validator
def define_checks
check_table :custom_check, 'name', severity: :error do |table|
table.family_name_present?
end
end
endSee Custom Validators for details.
Advantages of Fontisan
- Pure Ruby — No .NET runtime required
- Cross-platform — Works on Linux, macOS, Windows
- More features — Conversion, subsetting, collections
- Custom validators — Extensible validation
- Variable fonts — Full support
- Type 1 — Legacy format support