fontisan 0.2.14 → 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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +79 -4
  3. data/docs/.gitignore +17 -0
  4. data/docs/.vitepress/config.ts +317 -0
  5. data/docs/.vitepress/theme/components/ApiMethod.vue +127 -0
  6. data/docs/.vitepress/theme/components/Badge.vue +51 -0
  7. data/docs/.vitepress/theme/components/FeatureComparison.vue +87 -0
  8. data/docs/.vitepress/theme/components/HeroCodeBlock.vue +98 -0
  9. data/docs/.vitepress/theme/components/WithinHero.vue +30 -0
  10. data/docs/.vitepress/theme/index.ts +22 -0
  11. data/docs/.vitepress/theme/style.css +330 -0
  12. data/docs/api/conversion-options.md +141 -0
  13. data/docs/api/converters/curve-converter.md +34 -0
  14. data/docs/api/converters/hint-converter.md +34 -0
  15. data/docs/api/converters/outline-converter.md +27 -0
  16. data/docs/api/font-loader.md +111 -0
  17. data/docs/api/font-writer.md +103 -0
  18. data/docs/api/index.md +79 -0
  19. data/docs/api/models/glyph-accessor.md +43 -0
  20. data/docs/api/models/glyph.md +40 -0
  21. data/docs/api/models/table-analyzer.md +35 -0
  22. data/docs/api/sfnt-font.md +53 -0
  23. data/docs/api/type1-font.md +43 -0
  24. data/docs/api/validators/font-validator.md +31 -0
  25. data/docs/api/validators/helper.md +36 -0
  26. data/docs/api/validators/profile.md +39 -0
  27. data/docs/cli/convert.md +87 -0
  28. data/docs/cli/dump-table.md +110 -0
  29. data/docs/cli/export.md +176 -0
  30. data/docs/cli/features.md +124 -0
  31. data/docs/cli/glyphs.md +90 -0
  32. data/docs/cli/index.md +208 -0
  33. data/docs/cli/info.md +254 -0
  34. data/docs/cli/instance.md +122 -0
  35. data/docs/cli/ls.md +95 -0
  36. data/docs/cli/optical-size.md +94 -0
  37. data/docs/cli/pack.md +125 -0
  38. data/docs/cli/scripts.md +105 -0
  39. data/docs/cli/subset.md +39 -0
  40. data/docs/cli/tables.md +84 -0
  41. data/docs/cli/unicode.md +101 -0
  42. data/docs/cli/validate.md +48 -0
  43. data/docs/cli/variable.md +126 -0
  44. data/docs/cli/version.md +46 -0
  45. data/docs/guide/cli/convert.md +108 -0
  46. data/docs/guide/cli/export.md +138 -0
  47. data/docs/guide/cli/index.md +99 -0
  48. data/docs/guide/cli/info.md +144 -0
  49. data/docs/guide/cli/pack.md +155 -0
  50. data/docs/guide/cli/subset.md +118 -0
  51. data/docs/guide/cli/validate.md +139 -0
  52. data/docs/guide/color-fonts/bitmaps.md +177 -0
  53. data/docs/guide/color-fonts/colr-cpal.md +175 -0
  54. data/docs/guide/color-fonts/index.md +140 -0
  55. data/docs/guide/color-fonts/svg.md +154 -0
  56. data/docs/guide/color.md +51 -0
  57. data/docs/guide/comparisons/font-validator.md +222 -0
  58. data/docs/guide/comparisons/fonttools.md +200 -0
  59. data/docs/guide/comparisons/index.md +83 -0
  60. data/docs/guide/comparisons/lcdf-typetools.md +205 -0
  61. data/docs/guide/contributing.md +279 -0
  62. data/docs/guide/conversion/collections.md +251 -0
  63. data/docs/guide/conversion/curves.md +246 -0
  64. data/docs/guide/conversion/index.md +157 -0
  65. data/docs/guide/conversion/options.md +251 -0
  66. data/docs/guide/conversion/ttf-otf.md +184 -0
  67. data/docs/guide/conversion/type1.md +208 -0
  68. data/docs/guide/conversion/web.md +240 -0
  69. data/docs/guide/conversion.md +39 -0
  70. data/docs/guide/formats/collections.md +147 -0
  71. data/docs/guide/formats/dfont.md +99 -0
  72. data/docs/guide/formats/index.md +65 -0
  73. data/docs/guide/formats/otf.md +103 -0
  74. data/docs/guide/formats/svg.md +97 -0
  75. data/docs/guide/formats/ttf.md +105 -0
  76. data/docs/guide/formats/type1.md +118 -0
  77. data/docs/guide/formats/woff.md +115 -0
  78. data/docs/guide/hinting/autohint.md +141 -0
  79. data/docs/guide/hinting/conversion.md +161 -0
  80. data/docs/guide/hinting/index.md +86 -0
  81. data/docs/guide/hinting/postscript.md +149 -0
  82. data/docs/guide/hinting/truetype.md +135 -0
  83. data/docs/guide/hinting.md +44 -0
  84. data/docs/guide/index.md +152 -0
  85. data/docs/guide/installation.md +116 -0
  86. data/docs/guide/migrations/extract-ttc.md +549 -0
  87. data/docs/guide/migrations/font-validator.md +260 -0
  88. data/docs/guide/migrations/fonttools.md +208 -0
  89. data/docs/guide/migrations/index.md +64 -0
  90. data/docs/guide/migrations/otfinfo.md +197 -0
  91. data/docs/guide/quick-start.md +204 -0
  92. data/docs/guide/type1.md +58 -0
  93. data/docs/guide/universal-outline.md +151 -0
  94. data/docs/guide/validation/custom.md +195 -0
  95. data/docs/guide/validation/helpers.md +188 -0
  96. data/docs/guide/validation/index.md +132 -0
  97. data/docs/guide/validation/profiles.md +156 -0
  98. data/docs/guide/validation.md +47 -0
  99. data/docs/guide/variable-fonts/advanced.md +231 -0
  100. data/docs/guide/variable-fonts/axes.md +209 -0
  101. data/docs/guide/variable-fonts/conversion.md +197 -0
  102. data/docs/guide/variable-fonts/index.md +84 -0
  103. data/docs/guide/variable-fonts/instances.md +187 -0
  104. data/docs/guide/variable-fonts/named-instances.md +194 -0
  105. data/docs/guide/variable-fonts/static.md +168 -0
  106. data/docs/guide/variable.md +58 -0
  107. data/docs/guide/woff.md +59 -0
  108. data/docs/index.md +136 -0
  109. data/docs/lychee.toml +37 -0
  110. data/docs/package-lock.json +2560 -0
  111. data/docs/package.json +15 -0
  112. data/docs/public/apple-touch-icon.png +0 -0
  113. data/docs/public/favicon-96x96.png +0 -0
  114. data/docs/public/favicon.ico +0 -0
  115. data/docs/public/favicon.svg +1 -0
  116. data/docs/public/logo-full.svg +1 -0
  117. data/docs/public/logo.svg +1 -0
  118. data/docs/public/site.webmanifest +21 -0
  119. data/docs/public/web-app-manifest-192x192.png +0 -0
  120. data/docs/public/web-app-manifest-512x512.png +0 -0
  121. data/fontisan.gemspec +1 -1
  122. data/lib/fontisan/commands/features_command.rb +0 -1
  123. data/lib/fontisan/commands/scripts_command.rb +0 -1
  124. data/lib/fontisan/loading_modes.rb +0 -2
  125. data/lib/fontisan/sfnt_font.rb +4 -3
  126. data/lib/fontisan/tables/glyf/compound_glyph.rb +0 -1
  127. data/lib/fontisan/variable/delta_applicator.rb +3 -3
  128. data/lib/fontisan/variation/optimizer.rb +0 -1
  129. data/lib/fontisan/version.rb +1 -1
  130. data/lib/fontisan.rb +3 -2
  131. metadata +122 -4
@@ -0,0 +1,94 @@
1
+ ---
2
+ title: optical-size
3
+ ---
4
+
5
+ # optical-size
6
+
7
+ Show optical size information for a font.
8
+
9
+ ## Quick Reference
10
+
11
+ ```bash
12
+ fontisan optical-size <font> [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ |--------|-------------|
19
+ | `--format FORMAT` | Output format (text, yaml, json) |
20
+
21
+ ## What is Optical Size?
22
+
23
+ Optical sizing is a typographic technique where glyphs are designed differently for different point sizes. Small sizes need more open shapes and spacing, while large sizes can have more detail and tighter spacing.
24
+
25
+ Variable fonts can use the `opsz` axis for continuous optical sizing, while static fonts may have separate fonts for different size ranges (Caption, Text, Display, etc.).
26
+
27
+ ## Output
28
+
29
+ Shows:
30
+ - Optical size axis (if variable)
31
+ - Size range recommendations
32
+ - Design size metadata
33
+ - Named instances for sizes
34
+
35
+ ## Examples
36
+
37
+ ```bash
38
+ # Show optical size info
39
+ fontisan optical-size font.ttf
40
+
41
+ # JSON output
42
+ fontisan optical-size font.ttf --format json
43
+ ```
44
+
45
+ ## Sample Output
46
+
47
+ ### Variable Font with opsiz Axis
48
+
49
+ ```
50
+ Optical Size: VariableFont.ttf
51
+ ===============================
52
+
53
+ Axis: opsz (Optical Size)
54
+ Range: 8pt - 144pt
55
+ Default: 12pt
56
+
57
+ Size Recommendations:
58
+ Caption (6-8pt): opsz: 8
59
+ Small Text (9-11pt): opsz: 10
60
+ Text (12-14pt): opsz: 12
61
+ Subhead (14-24pt): opsz: 18
62
+ Display (24-72pt): opsz: 48
63
+ Poster (72pt+): opsz: 72
64
+ ```
65
+
66
+ ### Static Font with Size Range
67
+
68
+ ```
69
+ Optical Size: FontText-Regular.ttf
70
+ ==================================
71
+
72
+ Design Size: 12pt (Text)
73
+ Size Range: 11-13pt
74
+ Style: Text
75
+
76
+ Recommended for body text usage.
77
+ ```
78
+
79
+ ## Size Categories
80
+
81
+ | Category | Point Range | Use Case |
82
+ |----------|-------------|----------|
83
+ | Caption | 6-8 | Footnotes, captions |
84
+ | Small Text | 9-11 | Legal text, fine print |
85
+ | Text | 12-14 | Body copy |
86
+ | Subhead | 14-24 | Subheadings |
87
+ | Title | 24-36 | Headings |
88
+ | Display | 36-72 | Large headlines |
89
+ | Poster | 72+ | Very large text |
90
+
91
+ ## Related Commands
92
+
93
+ - [variable](/cli/variable) — Full variable font info
94
+ - [info](/cli/info) — General font information
data/docs/cli/pack.md ADDED
@@ -0,0 +1,125 @@
1
+ ---
2
+ title: pack/unpack
3
+ ---
4
+
5
+ # pack/unpack
6
+
7
+ Work with font collections — TTC, OTC, and dfont formats that contain multiple fonts in a single file.
8
+
9
+ ## What are Font Collections?
10
+
11
+ Font collections bundle multiple related fonts together:
12
+
13
+ | Format | Description | Extension |
14
+ |--------|-------------|-----------|
15
+ | TTC | TrueType Collection | `.ttc` |
16
+ | OTC | OpenType Collection (CFF) | `.otc` or `.ttc` |
17
+ | dfont | Apple Data Fork Font | `.dfont` |
18
+
19
+ Collections save space by sharing common tables (like glyph outlines) across fonts. They're commonly used for font families.
20
+
21
+ ## pack
22
+
23
+ Create a font collection from multiple individual fonts.
24
+
25
+ ```bash
26
+ fontisan pack <fonts...> --output <collection>
27
+ ```
28
+
29
+ ### Options
30
+
31
+ | Option | Description |
32
+ |--------|-------------|
33
+ | `--output FILE` | Output collection file (.ttc or .otc) |
34
+ | `--deduplicate` | Share common tables to reduce size |
35
+ | `--format TYPE` | Collection type (ttc or otc) |
36
+
37
+ ### Examples
38
+
39
+ ```bash
40
+ # Create a collection from a font family
41
+ fontisan pack Regular.ttf Bold.ttf Italic.ttf --output Family.ttc
42
+
43
+ # Create with table deduplication (smaller file)
44
+ fontisan pack *.ttf --output fonts.ttc --deduplicate
45
+
46
+ # Create an OpenType collection (CFF fonts)
47
+ fontisan pack Regular.otf Bold.otf --output fonts.otc
48
+ ```
49
+
50
+ ## unpack
51
+
52
+ Extract individual fonts from a collection.
53
+
54
+ ```bash
55
+ fontisan unpack <collection> [options]
56
+ ```
57
+
58
+ ### Options
59
+
60
+ | Option | Description |
61
+ |--------|-------------|
62
+ | `--output-dir DIR` | Output directory for extracted fonts |
63
+ | `--format FORMAT` | Convert to format (ttf, otf, woff, woff2) |
64
+ | `--index N` | Extract only the font at index N |
65
+ | `--font-index N` | Alias for --index |
66
+
67
+ ### Examples
68
+
69
+ ```bash
70
+ # List and extract all fonts
71
+ fontisan unpack fonts.ttc --output-dir ./extracted
72
+
73
+ # Extract and convert to web formats in one step
74
+ fontisan unpack fonts.ttc --output-dir ./web --format woff2
75
+
76
+ # Extract a specific font by index
77
+ fontisan unpack fonts.ttc --index 0 --output Regular.ttf
78
+
79
+ # Extract from Apple dfont
80
+ fontisan unpack fonts.dfont --output-dir ./extracted
81
+ ```
82
+
83
+ ## Common Workflows
84
+
85
+ ### Extract Collection for Web Use
86
+
87
+ ```bash
88
+ # Extract and convert to WOFF2 in one command
89
+ fontisan unpack family.ttc --output-dir ./web-fonts --format woff2
90
+ ```
91
+
92
+ ### Extract, Modify, and Repack
93
+
94
+ ```bash
95
+ # 1. Extract all fonts
96
+ fontisan unpack family.ttc --output-dir ./working
97
+
98
+ # 2. Modify fonts (e.g., subset, convert)
99
+ fontisan subset ./working/Regular.ttf --chars "ABC..." --output Regular-subset.ttf
100
+
101
+ # 3. Repack into new collection
102
+ fontisan pack *-subset.ttf --output family-subset.ttc --deduplicate
103
+ ```
104
+
105
+ ### Convert Collection Format
106
+
107
+ ```bash
108
+ # Extract from dfont, repack as TTC
109
+ fontisan unpack fonts.dfont --output-dir ./temp
110
+ fontisan pack ./temp/*.ttf --output fonts.ttc
111
+ ```
112
+
113
+ ### View Collection Contents
114
+
115
+ ```bash
116
+ # List fonts in a collection
117
+ fontisan ls fonts.ttc
118
+
119
+ # Get detailed info
120
+ fontisan info fonts.ttc
121
+ ```
122
+
123
+ ## Detailed Documentation
124
+
125
+ For comprehensive documentation including table sharing analysis and advanced options, see the [pack/unpack command guide](/guide/cli/pack).
@@ -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