fontisan 0.2.13 → 0.2.16

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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +56 -196
  3. data/Gemfile +1 -1
  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 +111 -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 +1 -1
  123. data/lib/fontisan/commands/features_command.rb +0 -1
  124. data/lib/fontisan/commands/info_command.rb +5 -5
  125. data/lib/fontisan/commands/scripts_command.rb +0 -1
  126. data/lib/fontisan/converters/format_converter.rb +2 -1
  127. data/lib/fontisan/converters/type1_converter.rb +65 -60
  128. data/lib/fontisan/hints/hint_converter.rb +2 -1
  129. data/lib/fontisan/loading_modes.rb +0 -2
  130. data/lib/fontisan/open_type_font.rb +0 -40
  131. data/lib/fontisan/sfnt_font.rb +41 -22
  132. data/lib/fontisan/tables/glyf/compound_glyph.rb +0 -1
  133. data/lib/fontisan/true_type_collection.rb +8 -8
  134. data/lib/fontisan/true_type_font.rb +1 -59
  135. data/lib/fontisan/type1/afm_parser.rb +2 -1
  136. data/lib/fontisan/type1/cff_to_type1_converter.rb +24 -19
  137. data/lib/fontisan/type1/private_dict.rb +28 -7
  138. data/lib/fontisan/type1/seac_expander.rb +22 -17
  139. data/lib/fontisan/variable/delta_applicator.rb +3 -3
  140. data/lib/fontisan/variation/optimizer.rb +0 -1
  141. data/lib/fontisan/version.rb +1 -1
  142. data/lib/fontisan/woff2_font.rb +2 -2
  143. data/lib/fontisan/woff_font.rb +3 -3
  144. data/lib/fontisan.rb +3 -2
  145. metadata +122 -4
@@ -0,0 +1,105 @@
1
+ ---
2
+ title: scripts
3
+ ---
4
+
5
+ # scripts
6
+
7
+ List scripts and languages supported by a font.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan scripts <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--format FORMAT` | Output format (text, yaml, json) |
20
+ | `--with-languages` | Include language systems |
21
+ | `--with-features` | Include features per script |
22
+
23
+ ## Output
24
+
25
+ Shows:
26
+ - Script tags (OpenType 4-character codes)
27
+ - Script names
28
+ - Language systems (optional)
29
+ - Feature count per script
30
+
31
+ ## Examples
32
+
33
+ ```bash
34
+ # List scripts
35
+ fontisan scripts font.ttf
36
+
37
+ # With language systems
38
+ fontisan scripts font.ttf --with-languages
39
+
40
+ # With features
41
+ fontisan scripts font.ttf --with-features
42
+
43
+ # JSON output
44
+ fontisan scripts font.ttf --format json
45
+ ```
46
+
47
+ ## Sample Output
48
+
49
+ ```
50
+ Scripts
51
+ =======
52
+
53
+ Tag Name Languages Features
54
+ ------ ---------------------- --------- --------
55
+ DFLT Default 1 12
56
+ latn Latin 27 45
57
+ cyrl Cyrillic 8 32
58
+ grek Greek 2 28
59
+ arab Arabic 4 38
60
+
61
+ Total: 5 scripts, 42 language systems
62
+ ```
63
+
64
+ ## Common Script Tags
65
+
66
+ | Tag | Script |
67
+ |-----|--------|
68
+ | `DFLT` | Default |
69
+ | `latn` | Latin |
70
+ | `cyrl` | Cyrillic |
71
+ | `grek` | Greek |
72
+ | `arab` | Arabic |
73
+ | `hebr` | Hebrew |
74
+ | `deva` | Devanagari |
75
+ | `beng` | Bengali |
76
+ | `hans` | Simplified Chinese |
77
+ | `hant` | Traditional Chinese |
78
+ | `jpan` | Japanese |
79
+ | `kore` | Korean |
80
+ | `thai` | Thai |
81
+
82
+ ## Use Cases
83
+
84
+ ### Check for Script Support
85
+
86
+ ```bash
87
+ fontisan scripts font.ttf | grep -i arab
88
+ ```
89
+
90
+ ### Verify Multi-script Font
91
+
92
+ ```bash
93
+ fontisan scripts font.ttf --format json | jq 'length'
94
+ ```
95
+
96
+ ### Compare Script Coverage
97
+
98
+ ```bash
99
+ diff <(fontisan scripts font1.ttf) <(fontisan scripts font2.ttf)
100
+ ```
101
+
102
+ ## Related Commands
103
+
104
+ - [features](/cli/features) — List OpenType features
105
+ - [unicode](/cli/unicode) — Show Unicode coverage
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: subset
3
+ ---
4
+
5
+ # subset
6
+
7
+ Create font subsets with reduced character sets.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan subset <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--chars TEXT` | Characters to include |
20
+ | `--file FILE` | File containing characters |
21
+ | `--output FILE` | Output file path |
22
+ | `--format FORMAT` | Output format |
23
+
24
+ ## Examples
25
+
26
+ ```bash
27
+ # Subset to specific characters
28
+ fontisan subset font.ttf --chars "ABCDEF" --output subset.ttf
29
+
30
+ # Subset from file
31
+ fontisan subset font.ttf --file chars.txt --output subset.ttf
32
+
33
+ # Subset and convert format
34
+ fontisan subset font.ttf --chars "Hello" --format woff2
35
+ ```
36
+
37
+ ## Detailed Documentation
38
+
39
+ For comprehensive documentation including unicode ranges and advanced subsetting, see the [subset command guide](/guide/cli/subset).
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: tables
3
+ ---
4
+
5
+ # tables
6
+
7
+ Show font table information.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan tables <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--format FORMAT` | Output format (text, yaml, json) |
20
+ | `--detail` | Show detailed table info |
21
+ | `--checksums` | Include checksums |
22
+
23
+ ## Output
24
+
25
+ Lists all tables in the font with:
26
+ - Table tag (4-character identifier)
27
+ - Checksum
28
+ - Offset
29
+ - Length
30
+
31
+ ## Examples
32
+
33
+ ```bash
34
+ # List all tables
35
+ fontisan tables font.ttf
36
+
37
+ # With checksums
38
+ fontisan tables font.ttf --checksums
39
+
40
+ # Detailed information
41
+ fontisan tables font.ttf --detail
42
+
43
+ # JSON output
44
+ fontisan tables font.ttf --format json
45
+ ```
46
+
47
+ ## Sample Output
48
+
49
+ ```
50
+ Tag Checksum Offset Length
51
+ ----- ---------- -------- --------
52
+ head 0x12345678 0 54
53
+ hhea 0x23456789 54 36
54
+ maxp 0x3456789A 90 32
55
+ OS/2 0x456789AB 122 96
56
+ name 0x56789ABC 218 1024
57
+ cmap 0x6789ABCD 1242 2048
58
+ ...
59
+ ```
60
+
61
+ ## Common Tables
62
+
63
+ | Tag | Name | Purpose |
64
+ |-----|------|---------|
65
+ | `head` | Font Header | Global font info |
66
+ | `hhea` | Horizontal Header | Horizontal metrics |
67
+ | `maxp` | Maximum Profile | Font requirements |
68
+ | `OS/2` | OS/2 | Windows metrics |
69
+ | `name` | Naming | Font names/strings |
70
+ | `cmap` | Character Map | Unicode to glyph mapping |
71
+ | `glyf` | Glyph Data | TrueType outlines |
72
+ | `loca` | Location | Glyph offsets |
73
+ | `CFF ` | CFF | Compact Font Format |
74
+ | `post` | PostScript | PostScript names |
75
+ | `GPOS` | Glyph Positioning | OpenType positioning |
76
+ | `GSUB` | Glyph Substitution | OpenType substitution |
77
+ | `fvar` | Font Variations | Variable font axes |
78
+ | `gvar` | Glyph Variations | Glyph deltas |
79
+ | `COLR` | Color Layers | Color font layers |
80
+ | `CPAL` | Color Palettes | Color font palettes |
81
+
82
+ ## Detailed Documentation
83
+
84
+ For table access via the Ruby API, see the [SfntFont API](/api/sfnt-font).
@@ -0,0 +1,101 @@
1
+ ---
2
+ title: unicode
3
+ ---
4
+
5
+ # unicode
6
+
7
+ Show Unicode coverage and character mappings.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan unicode <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--format FORMAT` | Output format (text, yaml, json) |
20
+ | `--ranges` | Show Unicode ranges |
21
+ | `--scripts` | Group by script |
22
+ | `--missing` | Show missing from range |
23
+
24
+ ## Output
25
+
26
+ Shows:
27
+ - Unicode ranges covered
28
+ - Scripts supported
29
+ - Character count per range
30
+ - Cmap table summary
31
+
32
+ ## Examples
33
+
34
+ ```bash
35
+ # Basic Unicode info
36
+ fontisan unicode font.ttf
37
+
38
+ # Show Unicode ranges
39
+ fontisan unicode font.ttf --ranges
40
+
41
+ # Group by script
42
+ fontisan unicode font.ttf --scripts
43
+
44
+ # JSON output
45
+ fontisan unicode font.ttf --format json
46
+ ```
47
+
48
+ ## Sample Output
49
+
50
+ ```
51
+ Unicode Coverage
52
+ ================
53
+
54
+ Range Characters
55
+ ------------------------------- ----------
56
+ Basic Latin (U+0000-U+007F) 95
57
+ Latin-1 Supplement (U+0080-U+00FF) 96
58
+ Latin Extended-A (U+0100-U+017F) 128
59
+ Latin Extended-B (U+0180-U+024F) 48
60
+ Spacing Modifier Letters (U+02B0-U+02FF) 8
61
+ Greek and Coptic (U+0370-U+03FF) 72
62
+ Cyrillic (U+0400-U+04FF) 66
63
+
64
+ Total characters: 513
65
+ ```
66
+
67
+ ## Common Unicode Ranges
68
+
69
+ | Range | Name | Typical Use |
70
+ |-------|------|-------------|
71
+ | U+0000-U+007F | Basic Latin | ASCII |
72
+ | U+0080-U+00FF | Latin-1 Supplement | Western European |
73
+ | U+0100-U+017F | Latin Extended-A | European |
74
+ | U+0400-U+04FF | Cyrillic | Russian, etc. |
75
+ | U+0590-U+05FF | Hebrew | Hebrew |
76
+ | U+0600-U+06FF | Arabic | Arabic |
77
+ | U+0900-U+097F | Devanagari | Hindi, etc. |
78
+ | U+4E00-U+9FFF | CJK Unified | Chinese/Japanese |
79
+ | U+AC00-U+D7AF | Hangul | Korean |
80
+
81
+ ## Use Cases
82
+
83
+ ### Check Script Support
84
+
85
+ ```bash
86
+ fontisan unicode font.ttf --scripts | grep -i cyrillic
87
+ ```
88
+
89
+ ### Find Coverage Gaps
90
+
91
+ ```bash
92
+ fontisan unicode font.ttf --missing
93
+ ```
94
+
95
+ ### Compare Fonts
96
+
97
+ ```bash
98
+ fontisan unicode font1.ttf --format json > unicode1.json
99
+ fontisan unicode font2.ttf --format json > unicode2.json
100
+ diff <(jq . unicode1.json) <(jq . unicode2.json)
101
+ ```
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: validate
3
+ ---
4
+
5
+ # validate
6
+
7
+ Validate fonts against industry-standard profiles.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan validate <font> --profile <profile> [options]
13
+ ```
14
+
15
+ ## Validation Profiles
16
+
17
+ | Profile | Description |
18
+ |---------|-------------|
19
+ | `opentype` | OpenType specification compliance |
20
+ | `google_fonts` | Google Fonts requirements |
21
+ | `microsoft` | Microsoft font standards |
22
+ | `adobe` | Adobe font guidelines |
23
+ | `production` | Production-ready validation |
24
+
25
+ ## Options
26
+
27
+ | Option | Description |
28
+ |--------|-------------|
29
+ | `--profile NAME` | Validation profile to use |
30
+ | `--format FORMAT` | Output format (text, yaml, json) |
31
+ | `--verbose` | Show all checks and results |
32
+
33
+ ## Examples
34
+
35
+ ```bash
36
+ # Validate for Google Fonts
37
+ fontisan validate font.ttf --profile google_fonts
38
+
39
+ # Validate for production
40
+ fontisan validate font.ttf --profile production
41
+
42
+ # JSON output
43
+ fontisan validate font.ttf --profile opentype --format json
44
+ ```
45
+
46
+ ## Detailed Documentation
47
+
48
+ For comprehensive documentation including profile details and validation helpers, see the [validate command guide](/guide/cli/validate).
@@ -0,0 +1,126 @@
1
+ ---
2
+ title: variable
3
+ ---
4
+
5
+ # variable
6
+
7
+ Inspect variable font axes and named instances.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan variable <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--format FORMAT` | Output format (text, yaml, json) |
20
+ | `--instances` | Show named instances |
21
+ | `--axes` | Show axes only |
22
+
23
+ ## Output
24
+
25
+ Shows:
26
+ - Variation axes with ranges and defaults
27
+ - Named instances (presets)
28
+ - Axis flags (hidden, etc.)
29
+
30
+ ## Examples
31
+
32
+ ```bash
33
+ # Full variable font info
34
+ fontisan variable VariableFont.ttf
35
+
36
+ # Show only axes
37
+ fontisan variable VariableFont.ttf --axes
38
+
39
+ # Show named instances
40
+ fontisan variable VariableFont.ttf --instances
41
+
42
+ # JSON output for processing
43
+ fontisan variable VariableFont.ttf --format json
44
+ ```
45
+
46
+ ## Sample Output
47
+
48
+ ```
49
+ Variable Font: VariableFont.ttf
50
+ ================================
51
+
52
+ Axes (2)
53
+ --------
54
+ Tag Name Min Default Max Flags
55
+ ------ ----------- ----- ------- ----- -----
56
+ wght Weight 100 400 900 -
57
+ wdth Width 75% 100% 125% -
58
+
59
+ Named Instances (6)
60
+ -------------------
61
+ Name Coordinates
62
+ ------------------ --------------------
63
+ Thin wght:100
64
+ Light wght:300
65
+ Regular wght:400
66
+ Medium wght:500
67
+ Bold wght:700
68
+ Black wght:900
69
+ ```
70
+
71
+ ## Understanding Axes
72
+
73
+ ### Standard Axes
74
+
75
+ | Tag | Name | Typical Range | Description |
76
+ |-----|------|---------------|-------------|
77
+ | `wght` | Weight | 1-999 | Font weight (thin to black) |
78
+ | `wdth` | Width | 50-200 | Width percentage |
79
+ | `slnt` | Slant | -90 to +90 | Slant angle in degrees |
80
+ | `ital` | Italic | 0-1 | Italic toggle |
81
+ | `opsz` | Optical Size | 8-144 | Point size for optical sizing |
82
+
83
+ ### Registered Axes
84
+
85
+ | Tag | Name | Description |
86
+ |-----|------|-------------|
87
+ | `GRAD` | Grade | Weight change without width change |
88
+ | `XTRA` | X-tra | X-height adjustment |
89
+ | `XOPQ` | X-opaque | Horizontal stroke adjustment |
90
+ | `YOPQ` | Y-opaque | Vertical stroke adjustment |
91
+ | `YTRA` | Y-tra | Y-height adjustment |
92
+ | `YTLC` | Y-lowercase | Lowercase height |
93
+ | `YTUC` | Y-uppercase | Uppercase height |
94
+ | `YTAS` | Y-ascender | Ascender height |
95
+ | `YTDE` | Y-descender | Descender depth |
96
+ | `YTFI` | Y-figure | Figure height |
97
+
98
+ ## Use Cases
99
+
100
+ ### Discover Available Instances
101
+
102
+ ```bash
103
+ fontisan variable font.ttf --instances
104
+ ```
105
+
106
+ ### Get Axis Range for Instance Generation
107
+
108
+ ```bash
109
+ # Get weight range
110
+ fontisan variable font.ttf --format json | jq '.axes[] | select(.tag=="wght")'
111
+ ```
112
+
113
+ ### Check if Font is Variable
114
+
115
+ ```bash
116
+ if fontisan variable font.ttf 2>/dev/null; then
117
+ echo "Variable font"
118
+ else
119
+ echo "Static font"
120
+ fi
121
+ ```
122
+
123
+ ## Related Commands
124
+
125
+ - [instance](/cli/instance) — Generate static instances
126
+ - [info](/cli/info) — Get font information
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: version
3
+ ---
4
+
5
+ # version
6
+
7
+ Display the Fontisan version information.
8
+
9
+ ## Usage
10
+
11
+ ```bash
12
+ fontisan version
13
+ ```
14
+
15
+ ## Description
16
+
17
+ Shows the currently installed version of Fontisan. This is useful for:
18
+
19
+ - Verifying installation
20
+ - Checking compatibility
21
+ - Reporting issues with version information
22
+
23
+ ## Examples
24
+
25
+ ```bash
26
+ # Show version
27
+ fontisan version
28
+
29
+ # Output:
30
+ # fontisan 0.1.0
31
+ ```
32
+
33
+ ## Programmatic Access
34
+
35
+ You can also get the version programmatically:
36
+
37
+ ```ruby
38
+ require 'fontisan'
39
+
40
+ puts Fontisan::VERSION
41
+ ```
42
+
43
+ ## Related Commands
44
+
45
+ - [info](/cli/info) — Get font information
46
+ - [tables](/cli/tables) — List font tables
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: convert
3
+ ---
4
+
5
+ # convert
6
+
7
+ Convert between font formats.
8
+
9
+ ## Usage
10
+
11
+ ```bash
12
+ fontisan convert INPUT --to FORMAT [options]
13
+ ```
14
+
15
+ ## Arguments
16
+
17
+ | Argument | Description |
18
+ |----------|-------------|
19
+ | `INPUT` | Input font file |
20
+ | `--to FORMAT` | Output format (ttf, otf, woff, woff2) |
21
+ | `--output PATH` | Output file path |
22
+
23
+ ## Options
24
+
25
+ ### Opening Options
26
+
27
+ | Option | Description |
28
+ |--------|-------------|
29
+ | `--decompose` | Decompose composite glyphs |
30
+ | `--convert-curves` | Convert quadratic ↔ cubic curves |
31
+ | `--scale-to-1000` | Scale to 1000 UPM |
32
+ | `--autohint` | Apply automatic hinting |
33
+ | `--generate-unicode` | Generate Unicode from glyph names |
34
+ | `--preserve-custom-tables` | Preserve non-standard tables |
35
+
36
+ ### Generating Options
37
+
38
+ | Option | Description |
39
+ |--------|-------------|
40
+ | `--hinting-mode MODE` | preserve, auto, none, full |
41
+ | `--optimize-tables` | Enable table optimization |
42
+ | `--preserve-metadata` | Keep copyright/license info |
43
+ | `--strip-metadata` | Remove metadata |
44
+ | `--target-format FORMAT` | Collection target format |
45
+
46
+ ### Presets
47
+
48
+ | Option | Description |
49
+ |--------|-------------|
50
+ | `--preset NAME` | Use named preset |
51
+ | `--show-options` | Show recommended options |
52
+
53
+ ## Presets
54
+
55
+ | Preset | Description |
56
+ |--------|-------------|
57
+ | `type1_to_modern` | Type 1 → OpenType |
58
+ | `modern_to_type1` | OpenType → Type 1 |
59
+ | `web_optimized` | Any → WOFF2 |
60
+ | `archive_to_modern` | Collection → OTF |
61
+
62
+ ## Examples
63
+
64
+ ### Basic Conversion
65
+
66
+ ```bash
67
+ # TTF to OTF
68
+ fontisan convert input.ttf --to otf --output output.otf
69
+
70
+ # OTF to WOFF2
71
+ fontisan convert input.otf --to woff2 --output output.woff2
72
+ ```
73
+
74
+ ### With Options
75
+
76
+ ```bash
77
+ # Convert with autohint
78
+ fontisan convert input.ttf --to otf --autohint --output output.otf
79
+
80
+ # Convert with curve conversion
81
+ fontisan convert input.ttf --to otf --convert-curves --output output.otf
82
+ ```
83
+
84
+ ### Using Presets
85
+
86
+ ```bash
87
+ # Type 1 to modern
88
+ fontisan convert font.pfb --to otf --preset type1_to_modern --output font.otf
89
+
90
+ # Web optimized
91
+ fontisan convert font.otf --to woff2 --preset web_optimized --output font.woff2
92
+ ```
93
+
94
+ ### Show Options
95
+
96
+ ```bash
97
+ # See what options will be used
98
+ fontisan convert input.ttf --to otf --show-options
99
+ ```
100
+
101
+ ## Batch Conversion
102
+
103
+ ```bash
104
+ # Convert all TTF files
105
+ for f in *.ttf; do
106
+ fontisan convert "$f" --to woff2 --output "${f%.ttf}.woff2"
107
+ done
108
+ ```