fontisan 0.2.14 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +79 -4
  3. data/Gemfile +6 -3
  4. data/docs/.gitignore +17 -0
  5. data/docs/.vitepress/config.ts +317 -0
  6. data/docs/.vitepress/theme/components/ApiMethod.vue +127 -0
  7. data/docs/.vitepress/theme/components/Badge.vue +51 -0
  8. data/docs/.vitepress/theme/components/FeatureComparison.vue +87 -0
  9. data/docs/.vitepress/theme/components/HeroCodeBlock.vue +98 -0
  10. data/docs/.vitepress/theme/components/WithinHero.vue +30 -0
  11. data/docs/.vitepress/theme/index.ts +22 -0
  12. data/docs/.vitepress/theme/style.css +330 -0
  13. data/docs/api/conversion-options.md +141 -0
  14. data/docs/api/converters/curve-converter.md +34 -0
  15. data/docs/api/converters/hint-converter.md +34 -0
  16. data/docs/api/converters/outline-converter.md +27 -0
  17. data/docs/api/font-loader.md +117 -0
  18. data/docs/api/font-writer.md +103 -0
  19. data/docs/api/index.md +79 -0
  20. data/docs/api/models/glyph-accessor.md +43 -0
  21. data/docs/api/models/glyph.md +40 -0
  22. data/docs/api/models/table-analyzer.md +35 -0
  23. data/docs/api/sfnt-font.md +53 -0
  24. data/docs/api/type1-font.md +43 -0
  25. data/docs/api/validators/font-validator.md +31 -0
  26. data/docs/api/validators/helper.md +36 -0
  27. data/docs/api/validators/profile.md +39 -0
  28. data/docs/cli/convert.md +87 -0
  29. data/docs/cli/dump-table.md +110 -0
  30. data/docs/cli/export.md +176 -0
  31. data/docs/cli/features.md +124 -0
  32. data/docs/cli/glyphs.md +90 -0
  33. data/docs/cli/index.md +208 -0
  34. data/docs/cli/info.md +254 -0
  35. data/docs/cli/instance.md +122 -0
  36. data/docs/cli/ls.md +95 -0
  37. data/docs/cli/optical-size.md +94 -0
  38. data/docs/cli/pack.md +125 -0
  39. data/docs/cli/scripts.md +105 -0
  40. data/docs/cli/subset.md +39 -0
  41. data/docs/cli/tables.md +84 -0
  42. data/docs/cli/unicode.md +101 -0
  43. data/docs/cli/validate.md +48 -0
  44. data/docs/cli/variable.md +126 -0
  45. data/docs/cli/version.md +46 -0
  46. data/docs/guide/cli/convert.md +108 -0
  47. data/docs/guide/cli/export.md +138 -0
  48. data/docs/guide/cli/index.md +99 -0
  49. data/docs/guide/cli/info.md +144 -0
  50. data/docs/guide/cli/pack.md +155 -0
  51. data/docs/guide/cli/subset.md +118 -0
  52. data/docs/guide/cli/validate.md +139 -0
  53. data/docs/guide/color-fonts/bitmaps.md +177 -0
  54. data/docs/guide/color-fonts/colr-cpal.md +175 -0
  55. data/docs/guide/color-fonts/index.md +140 -0
  56. data/docs/guide/color-fonts/svg.md +154 -0
  57. data/docs/guide/color.md +51 -0
  58. data/docs/guide/comparisons/font-validator.md +222 -0
  59. data/docs/guide/comparisons/fonttools.md +200 -0
  60. data/docs/guide/comparisons/index.md +83 -0
  61. data/docs/guide/comparisons/lcdf-typetools.md +205 -0
  62. data/docs/guide/contributing.md +279 -0
  63. data/docs/guide/conversion/collections.md +251 -0
  64. data/docs/guide/conversion/curves.md +246 -0
  65. data/docs/guide/conversion/index.md +157 -0
  66. data/docs/guide/conversion/options.md +251 -0
  67. data/docs/guide/conversion/ttf-otf.md +184 -0
  68. data/docs/guide/conversion/type1.md +208 -0
  69. data/docs/guide/conversion/web.md +240 -0
  70. data/docs/guide/conversion.md +39 -0
  71. data/docs/guide/formats/collections.md +147 -0
  72. data/docs/guide/formats/dfont.md +99 -0
  73. data/docs/guide/formats/index.md +65 -0
  74. data/docs/guide/formats/otf.md +103 -0
  75. data/docs/guide/formats/svg.md +97 -0
  76. data/docs/guide/formats/ttf.md +105 -0
  77. data/docs/guide/formats/type1.md +118 -0
  78. data/docs/guide/formats/woff.md +115 -0
  79. data/docs/guide/hinting/autohint.md +141 -0
  80. data/docs/guide/hinting/conversion.md +161 -0
  81. data/docs/guide/hinting/index.md +86 -0
  82. data/docs/guide/hinting/postscript.md +149 -0
  83. data/docs/guide/hinting/truetype.md +135 -0
  84. data/docs/guide/hinting.md +44 -0
  85. data/docs/guide/index.md +152 -0
  86. data/docs/guide/installation.md +116 -0
  87. data/docs/guide/migrations/extract-ttc.md +549 -0
  88. data/docs/guide/migrations/font-validator.md +260 -0
  89. data/docs/guide/migrations/fonttools.md +208 -0
  90. data/docs/guide/migrations/index.md +64 -0
  91. data/docs/guide/migrations/otfinfo.md +197 -0
  92. data/docs/guide/quick-start.md +204 -0
  93. data/docs/guide/type1.md +58 -0
  94. data/docs/guide/universal-outline.md +151 -0
  95. data/docs/guide/validation/custom.md +195 -0
  96. data/docs/guide/validation/helpers.md +188 -0
  97. data/docs/guide/validation/index.md +132 -0
  98. data/docs/guide/validation/profiles.md +156 -0
  99. data/docs/guide/validation.md +47 -0
  100. data/docs/guide/variable-fonts/advanced.md +231 -0
  101. data/docs/guide/variable-fonts/axes.md +209 -0
  102. data/docs/guide/variable-fonts/conversion.md +197 -0
  103. data/docs/guide/variable-fonts/index.md +84 -0
  104. data/docs/guide/variable-fonts/instances.md +187 -0
  105. data/docs/guide/variable-fonts/named-instances.md +194 -0
  106. data/docs/guide/variable-fonts/static.md +168 -0
  107. data/docs/guide/variable.md +58 -0
  108. data/docs/guide/woff.md +59 -0
  109. data/docs/index.md +136 -0
  110. data/docs/lychee.toml +37 -0
  111. data/docs/package-lock.json +2560 -0
  112. data/docs/package.json +15 -0
  113. data/docs/public/apple-touch-icon.png +0 -0
  114. data/docs/public/favicon-96x96.png +0 -0
  115. data/docs/public/favicon.ico +0 -0
  116. data/docs/public/favicon.svg +1 -0
  117. data/docs/public/logo-full.svg +1 -0
  118. data/docs/public/logo.svg +1 -0
  119. data/docs/public/site.webmanifest +21 -0
  120. data/docs/public/web-app-manifest-192x192.png +0 -0
  121. data/docs/public/web-app-manifest-512x512.png +0 -0
  122. data/fontisan.gemspec +2 -1
  123. data/lib/fontisan/commands/features_command.rb +0 -1
  124. data/lib/fontisan/commands/scripts_command.rb +0 -1
  125. data/lib/fontisan/constants.rb +29 -6
  126. data/lib/fontisan/font_loader.rb +184 -318
  127. data/lib/fontisan/loading_modes.rb +0 -2
  128. data/lib/fontisan/sfnt_font.rb +4 -3
  129. data/lib/fontisan/tables/glyf/compound_glyph.rb +0 -1
  130. data/lib/fontisan/variable/delta_applicator.rb +3 -3
  131. data/lib/fontisan/variation/optimizer.rb +0 -1
  132. data/lib/fontisan/version.rb +1 -1
  133. data/lib/fontisan.rb +3 -2
  134. metadata +136 -4
@@ -0,0 +1,222 @@
1
+ ---
2
+ title: vs Font-Validator
3
+ ---
4
+
5
+ # Fontisan vs Font-Validator
6
+
7
+ Compare Fontisan with Microsoft's Font-Validator.
8
+
9
+ ## Overview
10
+
11
+ Font-Validator is Microsoft's C# tool for comprehensive font validation.
12
+
13
+ | | Font-Validator | Fontisan |
14
+ |---|----------------|----------|
15
+ | Language | C# | Ruby |
16
+ | Runtime | .NET required | None |
17
+ | Platform | Windows focus | Cross-platform |
18
+ | Features | Validation only | Full suite |
19
+
20
+ ## Profile Equivalents
21
+
22
+ | Font-Validator | Fontisan |
23
+ |----------------|----------|
24
+ | Auto | `fontisan validate -t indexability` |
25
+ | Full | `fontisan validate -t production` |
26
+ | Web | `fontisan validate -t web` |
27
+ | Custom | `fontisan validate -t spec_compliance` |
28
+
29
+ ## Feature Comparison
30
+
31
+ ### Validation
32
+
33
+ | Feature | Font-Validator | Fontisan |
34
+ |---------|----------------|----------|
35
+ | Profiles | 3+ | 5 |
36
+ | Helpers | ~50 | 56 |
37
+ | Coverage reports | ✅ | ✅ |
38
+ | Custom rules | ❌ | ✅ |
39
+ | Severity levels | ✅ | ✅ |
40
+ | Output formats | XML | YAML, JSON, Text |
41
+
42
+ ### Font Operations
43
+
44
+ | Feature | Font-Validator | Fontisan |
45
+ |---------|----------------|----------|
46
+ | Validation | ✅ | ✅ |
47
+ | Conversion | ❌ | ✅ |
48
+ | Subsetting | ❌ | ✅ |
49
+ | Information | Limited | ✅ |
50
+ | Collections | Limited | ✅ |
51
+
52
+ ### Format Support
53
+
54
+ | Format | Font-Validator | Fontisan |
55
+ |--------|----------------|----------|
56
+ | TrueType | ✅ | ✅ |
57
+ | OpenType | ✅ | ✅ |
58
+ | WOFF | ✅ | ✅ |
59
+ | WOFF2 | ✅ | ✅ |
60
+ | Type 1 | ❌ | ✅ |
61
+ | TTC/OTC | Limited | ✅ |
62
+
63
+ ### Variable Fonts
64
+
65
+ | Feature | Font-Validator | Fontisan |
66
+ |---------|----------------|----------|
67
+ | fvar validation | ✅ | ✅ |
68
+ | gvar validation | ✅ | ✅ |
69
+ | Instance generation | ❌ | ✅ |
70
+ | Format conversion | ❌ | ✅ |
71
+
72
+ ## Validation Profiles
73
+
74
+ ### Fontisan Profiles
75
+
76
+ | Profile | Checks | Focus |
77
+ |---------|--------|-------|
78
+ | indexability | 8 | Fast discovery |
79
+ | usability | 26 | Installation |
80
+ | production | 37 | Full quality |
81
+ | web | 18 | Web fonts |
82
+ | spec_compliance | Full | Spec audit |
83
+
84
+ ### Font-Validator Profiles
85
+
86
+ | Profile | Focus |
87
+ |---------|-------|
88
+ | Auto | Quick check |
89
+ | Full | Comprehensive |
90
+ | Web | Web fonts |
91
+
92
+ ## Unique Features
93
+
94
+ ### Fontisan Unique
95
+
96
+ - **Pure Ruby** — No .NET runtime
97
+ - **Font conversion** — TTF ↔ OTF ↔ WOFF
98
+ - **Subsetting** — Create font subsets
99
+ - **Collections** — Full TTC/OTC support
100
+ - **Custom validators** — DSL for rules
101
+ - **Variable fonts** — Instance generation
102
+ - **Type 1 support** — Legacy format
103
+
104
+ ### Font-Validator Unique
105
+
106
+ - **Microsoft official** — From the source
107
+ - **Deep Windows integration** — Windows-specific checks
108
+ - **Mature** — Long development history
109
+
110
+ ## Installation Comparison
111
+
112
+ ### Font-Validator
113
+
114
+ ```bash
115
+ # Requires .NET runtime
116
+ # Windows: Download MSI
117
+ # Linux: Requires Mono or .NET Core
118
+ # macOS: Requires .NET Core
119
+
120
+ dotnet tool install --global FontValidator
121
+ ```
122
+
123
+ ### Fontisan
124
+
125
+ ```bash
126
+ # All platforms, no runtime
127
+ gem install fontisan
128
+ ```
129
+
130
+ ## Use Case Recommendations
131
+
132
+ ### Use Fontisan When:
133
+
134
+ - You're not on Windows
135
+ - You need conversion features
136
+ - You need subsetting
137
+ - You want custom validators
138
+ - You need Type 1 support
139
+
140
+ ### Use Font-Validator When:
141
+
142
+ - You need Microsoft official validation
143
+ - You need Windows-specific checks
144
+ - You're in a .NET environment
145
+
146
+ ## Code Comparison
147
+
148
+ ### Basic Validation
149
+
150
+ ```bash
151
+ # Font-Validator
152
+ FontValidator.exe font.ttf
153
+
154
+ # Fontisan
155
+ fontisan validate font.ttf
156
+ ```
157
+
158
+ ### With Profile
159
+
160
+ ```bash
161
+ # Font-Validator
162
+ FontValidator.exe -Profile Full font.ttf
163
+
164
+ # Fontisan
165
+ fontisan validate font.ttf -t production
166
+ ```
167
+
168
+ ### Output Format
169
+
170
+ ```bash
171
+ # Font-Validator
172
+ FontValidator.exe -Output report.xml font.ttf
173
+
174
+ # Fontisan
175
+ fontisan validate font.ttf --format json
176
+ ```
177
+
178
+ ## Custom Validators
179
+
180
+ Fontisan allows custom validation rules (not available in Font-Validator):
181
+
182
+ ```ruby
183
+ class MyValidator < Fontisan::Validators::Validator
184
+ def define_checks
185
+ check_table :name_check, 'name', severity: :error do |table|
186
+ table.family_name_present? &&
187
+ table.postscript_name_valid?
188
+ end
189
+ end
190
+ end
191
+ ```
192
+
193
+ ## CI/CD Integration
194
+
195
+ ### Font-Validator
196
+
197
+ ```yaml
198
+ # Requires .NET runtime
199
+ - uses: actions/setup-dotnet@v3
200
+ - run: FontValidator.exe fonts/*.ttf
201
+ ```
202
+
203
+ ### Fontisan
204
+
205
+ ```yaml
206
+ # Uses Ruby (already available on most runners)
207
+ - uses: ruby/setup-ruby@v1
208
+ - run: gem install fontisan
209
+ - run: fontisan validate fonts/*.ttf
210
+ ```
211
+
212
+ ## Conclusion
213
+
214
+ | Need | Recommendation |
215
+ |------|----------------|
216
+ | Ruby environment | Fontisan |
217
+ | Cross-platform | Fontisan |
218
+ | Conversion features | Fontisan |
219
+ | Custom validation | Fontisan |
220
+ | Microsoft official | Font-Validator |
221
+ | Windows-specific | Font-Validator |
222
+ | .NET environment | Font-Validator |
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: vs fonttools
3
+ ---
4
+
5
+ # Fontisan vs fonttools
6
+
7
+ Compare Fontisan with Python's fonttools library.
8
+
9
+ ## Overview
10
+
11
+ | | fonttools | Fontisan |
12
+ |---|-----------|----------|
13
+ | Language | Python | Ruby |
14
+ | Dependencies | Python + extensions | Pure Ruby |
15
+ | Native code | Required | None |
16
+ | Validation | External tools | Built-in |
17
+
18
+ ## Feature Comparison
19
+
20
+ ### Font Formats
21
+
22
+ | Format | fonttools | Fontisan |
23
+ |--------|-----------|----------|
24
+ | TrueType (TTF) | ✅ | ✅ |
25
+ | OpenType (OTF) | ✅ | ✅ |
26
+ | WOFF | ✅ | ✅ |
27
+ | WOFF2 | ✅ | ✅ |
28
+ | Type 1 (PFB/PFA) | Partial | ✅ |
29
+ | TTC/OTC | ✅ | ✅ |
30
+ | dfont | ✅ | ✅ |
31
+ | SVG | ✅ | ✅ |
32
+ | UFO | ✅ | Planned |
33
+
34
+ ### Font Operations
35
+
36
+ | Operation | fonttools | Fontisan |
37
+ |-----------|-----------|----------|
38
+ | Font loading | ✅ | ✅ |
39
+ | Font saving | ✅ | ✅ |
40
+ | Table access | ✅ | ✅ |
41
+ | TTX export | ✅ | ✅ |
42
+ | Subsetting | ✅ | ✅ |
43
+ | Merging | ✅ | ✅ |
44
+
45
+ ### Variable Fonts
46
+
47
+ | Feature | fonttools | Fontisan |
48
+ |---------|-----------|----------|
49
+ | fvar reading | ✅ | ✅ |
50
+ | gvar reading | ✅ | ✅ |
51
+ | CFF2 reading | ✅ | ✅ |
52
+ | Instance generation | ✅ | ✅ |
53
+ | Format conversion | ✅ | ✅ |
54
+
55
+ ### Font Conversion
56
+
57
+ | Conversion | fonttools | Fontisan |
58
+ |------------|-----------|----------|
59
+ | TTF ↔ OTF | ✅ | ✅ |
60
+ | TTF ↔ WOFF | ✅ | ✅ |
61
+ | TTF ↔ WOFF2 | ✅ | ✅ |
62
+ | Type 1 → OTF | ✅ | ✅ |
63
+ | OTF → Type 1 | ❌ | ✅ |
64
+ | Curve conversion | ✅ | ✅ |
65
+
66
+ ### Hinting
67
+
68
+ | Feature | fonttools | Fontisan |
69
+ |---------|-----------|----------|
70
+ | TrueType instructions | Read | Read |
71
+ | PostScript hints | Read | Read |
72
+ | Hint conversion | ❌ | ✅ |
73
+ | Bidirectional | ❌ | ✅ |
74
+ | Autohint | External | ✅ |
75
+
76
+ ### Validation
77
+
78
+ | Feature | fonttools | Fontisan |
79
+ |---------|-----------|----------|
80
+ | Built-in validation | ❌ | ✅ |
81
+ | Validation profiles | ❌ | ✅ (5) |
82
+ | Validation helpers | ❌ | ✅ (56) |
83
+ | Custom validators | ❌ | ✅ |
84
+ | Coverage reports | ❌ | ✅ |
85
+
86
+ ### Collections
87
+
88
+ | Feature | fonttools | Fontisan |
89
+ |---------|-----------|----------|
90
+ | TTC/OTC reading | ✅ | ✅ |
91
+ | TTC/OTC writing | ✅ | ✅ |
92
+ | Table deduplication | ✅ | ✅ |
93
+ | dfont support | ✅ | ✅ |
94
+
95
+ ## Unique Features
96
+
97
+ ### Fontisan Unique
98
+
99
+ - **Pure Ruby** — No Python, no native extensions
100
+ - **Built-in validation** — 5 profiles, 56 helpers
101
+ - **Bidirectional hint conversion** — TrueType ↔ PostScript
102
+ - **Custom validators** — DSL for validation rules
103
+ - **Type 1 roundtrip** — Full conversion support
104
+
105
+ ### fonttools Unique
106
+
107
+ - **UFO format** — Full UFO 3 support
108
+ - **FEA parsing** — Adobe Feature Expressions
109
+ - **Designspace** — MutatorMath integration
110
+ - **Extensive ecosystem** — Many third-party tools
111
+
112
+ ## Performance
113
+
114
+ ### Installation
115
+
116
+ | Metric | fonttools | Fontisan |
117
+ |--------|-----------|----------|
118
+ | Python required | Yes | No |
119
+ | C extensions | Often required | No |
120
+ | Install time | 30-60s | 5-10s |
121
+ | Dependencies | Many | None |
122
+
123
+ ### Runtime
124
+
125
+ Both libraries are fast enough for most use cases. Fontisan's pure Ruby approach has minimal overhead for typical operations.
126
+
127
+ ## Use Case Recommendations
128
+
129
+ ### Use Fontisan When:
130
+
131
+ - You're in a Ruby environment
132
+ - You need validation built-in
133
+ - You need hint conversion
134
+ - You want minimal dependencies
135
+ - You're deploying to constrained environments
136
+
137
+ ### Use fonttools When:
138
+
139
+ - You're in a Python environment
140
+ - You need UFO/FEA support
141
+ - You need Designspace support
142
+ - You rely on the Python font ecosystem
143
+
144
+ ## Code Comparison
145
+
146
+ ### Load and Save
147
+
148
+ ```python
149
+ # fonttools
150
+ from fontTools.ttLib import TTFont
151
+ font = TTFont('input.ttf')
152
+ font.save('output.ttf')
153
+ ```
154
+
155
+ ```ruby
156
+ # Fontisan
157
+ font = Fontisan::FontLoader.load('input.ttf')
158
+ Fontisan::FontWriter.write(font, 'output.ttf')
159
+ ```
160
+
161
+ ### Access Table
162
+
163
+ ```python
164
+ # fonttools
165
+ name = font['name'].getBestFamilyName()
166
+ ```
167
+
168
+ ```ruby
169
+ # Fontisan
170
+ name = font.tables['name'].family_name
171
+ ```
172
+
173
+ ### Variable Font Instance
174
+
175
+ ```python
176
+ # fonttools
177
+ from fontTools.varLib.instancer import instantiateVariableFont
178
+ instance = instantiateVariableFont(font, {'wght': 700})
179
+ ```
180
+
181
+ ```ruby
182
+ # Fontisan
183
+ writer = Fontisan::Variation::InstanceWriter.new(font)
184
+ instance = writer.generate_instance(wght: 700)
185
+ ```
186
+
187
+ ## Migration
188
+
189
+ See [Migrate from fonttools](/guide/migrations/fonttools) for a detailed migration guide.
190
+
191
+ ## Conclusion
192
+
193
+ | Need | Recommendation |
194
+ |------|----------------|
195
+ | Ruby environment | Fontisan |
196
+ | Python environment | fonttools |
197
+ | Validation | Fontisan |
198
+ | UFO/FEA | fonttools |
199
+ | Hint conversion | Fontisan |
200
+ | Minimal dependencies | Fontisan |
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Feature Comparisons
3
+ ---
4
+
5
+ # Feature Comparisons
6
+
7
+ Compare Fontisan's capabilities with other popular font processing tools.
8
+
9
+ ## Comparison Pages
10
+
11
+ ### vs fonttools
12
+
13
+ [→ Compare with fonttools](/guide/comparisons/fonttools)
14
+
15
+ Comprehensive comparison with Python's fonttools library:
16
+ - Font formats (TTF, OTF, TTC, WOFF, WOFF2, Type 1, SVG, UFO)
17
+ - Variable fonts (instancing, conversion, axes)
18
+ - Font conversion (TTF↔OTF, curves, hints)
19
+ - Font validation
20
+ - Color fonts
21
+ - Hinting
22
+ - Collections
23
+
24
+ ### vs lcdf-typetools
25
+
26
+ [→ Compare with lcdf-typetools](/guide/comparisons/lcdf-typetools)
27
+
28
+ Comparison with the lcdf-typetools suite (otfinfo, cfftot1, etc.):
29
+ - Font information extraction
30
+ - CFF/Type 1 conversion
31
+ - Font validation
32
+ - Hint handling
33
+
34
+ ### vs Font-Validator
35
+
36
+ [→ Compare with Font-Validator](/guide/comparisons/font-validator)
37
+
38
+ Comparison with Microsoft's Font-Validator:
39
+ - Validation profiles
40
+ - Helper coverage
41
+ - Reporting capabilities
42
+
43
+ ## Key Advantages
44
+
45
+ ### 💎 Pure Ruby
46
+
47
+ Fontisan is 100% pure Ruby with no external dependencies:
48
+
49
+ - **No Python** required (unlike fonttools)
50
+ - **No C++ compilation** needed (unlike lcdf-typetools)
51
+ - **No .NET runtime** required (unlike Font-Validator)
52
+ - Works anywhere Ruby runs — Linux, macOS, Windows, BSD
53
+
54
+ ### 🔄 Bidirectional Hint Conversion
55
+
56
+ Fontisan is the **only** library that supports bidirectional hint conversion:
57
+
58
+ - TrueType instructions → PostScript hints
59
+ - PostScript hints → TrueType instructions
60
+ - Automatic hint generation (autohint)
61
+
62
+ ### ✅ Built-in Validation
63
+
64
+ Unlike fonttools, Fontisan includes comprehensive validation:
65
+
66
+ - 5 validation profiles
67
+ - 56 validation helpers
68
+ - Custom validation DSL
69
+ - Detailed error reporting
70
+
71
+ ### 📦 All-in-One
72
+
73
+ Fontisan combines capabilities from multiple tools:
74
+
75
+ | Capability | fonttools | lcdf-typetools | Font-Validator | Fontisan |
76
+ |-----------|-----------|----------------|----------------|----------|
77
+ | Font conversion | ✅ | ✅ | ❌ | ✅ |
78
+ | Font validation | ❌ | ❌ | ✅ | ✅ |
79
+ | Variable fonts | ✅ | ❌ | ❌ | ✅ |
80
+ | Type 1 support | Partial | ✅ | ❌ | ✅ |
81
+ | Color fonts | ✅ | ❌ | ❌ | ✅ |
82
+ | Hint conversion | ❌ | Partial | ❌ | ✅ |
83
+ | **Pure Ruby** | ❌ | ❌ | ❌ | ✅ |
@@ -0,0 +1,205 @@
1
+ ---
2
+ title: vs lcdf-typetools
3
+ ---
4
+
5
+ # Fontisan vs lcdf-typetools
6
+
7
+ Compare Fontisan with the lcdf-typetools suite (otfinfo, cfftot1, t1dotlessj, etc.).
8
+
9
+ ## Overview
10
+
11
+ lcdf-typetools is a C++ suite including:
12
+ - `otfinfo` — Font information
13
+ - `cfftot1` — CFF to Type 1 conversion
14
+ - `t1dotlessj` — Type 1 manipulation
15
+ - `t1reencode` — Type 1 reencoding
16
+ - `ttf2otf` — TTF to OTF conversion
17
+
18
+ | | lcdf-typetools | Fontisan |
19
+ |---|----------------|----------|
20
+ | Language | C++ | Ruby |
21
+ | Compilation | Required | None |
22
+ | Installation | Complex | `gem install` |
23
+ | Cross-platform | Limited | Full |
24
+
25
+ ## Tool Equivalents
26
+
27
+ ### otfinfo
28
+
29
+ | otfinfo | Fontisan |
30
+ |---------|----------|
31
+ | `otfinfo -i font.ttf` | `fontisan info font.ttf` |
32
+ | `otfinfo -s font.ttf` | `fontisan info font.ttf --features` |
33
+ | `otfinfo -f font.ttf` | `fontisan info font.ttf --features` |
34
+ | `otfinfo -g font.ttf` | `fontisan info font.ttf --glyphs` |
35
+ | `otfinfo -u font.ttf` | `fontisan info font.ttf --unicode` |
36
+ | `otfinfo -t font.ttf` | `fontisan info font.ttf --tables` |
37
+
38
+ ### cfftot1
39
+
40
+ | cfftot1 | Fontisan |
41
+ |---------|----------|
42
+ | `cfftot1 font.otf` | `fontisan convert font.otf --to type1 --output font.pfb` |
43
+
44
+ ### t1reencode
45
+
46
+ | t1reencode | Fontisan |
47
+ |------------|----------|
48
+ | `t1reencode font.pfb` | `fontisan convert font.pfb --to type1 --auto-encoding` |
49
+
50
+ ### ttf2otf
51
+
52
+ | ttf2otf | Fontisan |
53
+ |---------|----------|
54
+ | `ttf2otf font.ttf` | `fontisan convert font.ttf --to otf --output font.otf` |
55
+
56
+ ## Feature Comparison
57
+
58
+ ### Font Information
59
+
60
+ | Feature | otfinfo | Fontisan |
61
+ |---------|---------|----------|
62
+ | Basic info | ✅ | ✅ |
63
+ | Script info | ✅ | ✅ |
64
+ | Feature info | ✅ | ✅ |
65
+ | Glyph info | ✅ | ✅ |
66
+ | Unicode info | ✅ | ✅ |
67
+ | Table info | ✅ | ✅ |
68
+ | YAML/JSON | ❌ | ✅ |
69
+
70
+ ### Font Conversion
71
+
72
+ | Feature | lcdf-typetools | Fontisan |
73
+ |---------|----------------|----------|
74
+ | TTF → OTF | ✅ (ttf2otf) | ✅ |
75
+ | OTF → TTF | ❌ | ✅ |
76
+ | OTF → Type 1 | ✅ (cfftot1) | ✅ |
77
+ | Type 1 → OTF | ❌ | ✅ |
78
+ | TTF → WOFF2 | ❌ | ✅ |
79
+
80
+ ### Hinting
81
+
82
+ | Feature | lcdf-typetools | Fontisan |
83
+ |---------|----------------|----------|
84
+ | TrueType hints | Read | Read |
85
+ | PostScript hints | Read | Read |
86
+ | Hint conversion | Partial | ✅ |
87
+ | Bidirectional | ❌ | ✅ |
88
+
89
+ ### Validation
90
+
91
+ | Feature | lcdf-typetools | Fontisan |
92
+ |---------|----------------|----------|
93
+ | Validation | ❌ | ✅ |
94
+ | Profiles | ❌ | ✅ (5) |
95
+ | Helpers | ❌ | ✅ (56) |
96
+
97
+ ### Collections
98
+
99
+ | Feature | lcdf-typetools | Fontisan |
100
+ |---------|----------------|----------|
101
+ | TTC/OTC reading | ❌ | ✅ |
102
+ | TTC/OTC writing | ❌ | ✅ |
103
+ | dfont support | ❌ | ✅ |
104
+
105
+ ## Unique Features
106
+
107
+ ### Fontisan Unique
108
+
109
+ - **Pure Ruby** — No C++ compilation
110
+ - **Built-in validation** — Comprehensive checking
111
+ - **Bidirectional hint conversion** — TrueType ↔ PostScript
112
+ - **Full collection support** — TTC/OTC/dfont
113
+ - **Type 1 → OTF** — Reverse conversion
114
+ - **WOFF/WOFF2** — Web font support
115
+
116
+ ### lcdf-typetools Unique
117
+
118
+ - **t1dotlessj** — Specialized Type 1 manipulation
119
+ - **t1lint** — Type 1 linting
120
+ - **Fast C++** — Native performance
121
+ - **Mature** — Long history
122
+
123
+ ## Installation Comparison
124
+
125
+ ### lcdf-typetools
126
+
127
+ ```bash
128
+ # macOS
129
+ brew install lcdf-typetools
130
+
131
+ # Linux
132
+ apt install lcdf-typetools
133
+ # or compile from source
134
+
135
+ # Windows
136
+ # Requires MSYS2 or WSL
137
+ ```
138
+
139
+ ### Fontisan
140
+
141
+ ```bash
142
+ # All platforms
143
+ gem install fontisan
144
+ ```
145
+
146
+ ## Use Case Recommendations
147
+
148
+ ### Use Fontisan When:
149
+
150
+ - You need validation
151
+ - You need WOFF/WOFF2
152
+ - You need collection support
153
+ - You want minimal installation
154
+ - You need Type 1 → OTF conversion
155
+
156
+ ### Use lcdf-typetools When:
157
+
158
+ - You need t1dotlessj
159
+ - You need t1lint
160
+ - You're in a C++ environment
161
+ - You have existing workflows
162
+
163
+ ## Code Comparison
164
+
165
+ ### Get Font Info
166
+
167
+ ```bash
168
+ # otfinfo
169
+ otfinfo -i font.ttf | grep Family
170
+
171
+ # Fontisan
172
+ fontisan info font.ttf --format json | jq '.family'
173
+ ```
174
+
175
+ ### Convert TTF to OTF
176
+
177
+ ```bash
178
+ # ttf2otf
179
+ ttf2otf font.ttf font.otf
180
+
181
+ # Fontisan
182
+ fontisan convert font.ttf --to otf --output font.otf
183
+ ```
184
+
185
+ ### Convert OTF to Type 1
186
+
187
+ ```bash
188
+ # cfftot1
189
+ cfftot1 font.otf font.pfb
190
+
191
+ # Fontisan
192
+ fontisan convert font.otf --to type1 --output font.pfb
193
+ ```
194
+
195
+ ## Conclusion
196
+
197
+ | Need | Recommendation |
198
+ |------|----------------|
199
+ | Ruby environment | Fontisan |
200
+ | Validation | Fontisan |
201
+ | WOFF/WOFF2 | Fontisan |
202
+ | Collections | Fontisan |
203
+ | t1dotlessj | lcdf-typetools |
204
+ | Type 1 linting | lcdf-typetools |
205
+ | Minimal installation | Fontisan |