fontist 2.1.4 → 2.1.5
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/docs/.vitepress/config.ts +17 -0
- data/docs/cli/create-formula.md +6 -0
- data/docs/cli/import.md +4 -0
- data/docs/guide/formulas.md +73 -0
- data/docs/guide/installation.md +62 -0
- data/docs/guide/maintainer/import.md +372 -0
- data/docs/guide/maintainer/index.md +37 -0
- data/docs/guide/platforms/index.md +72 -0
- data/docs/guide/platforms/macos.md +151 -0
- data/docs/guide/platforms/windows.md +220 -0
- data/fontist.gemspec +0 -1
- data/lib/fontist/cache/manager.rb +0 -2
- data/lib/fontist/cache.rb +6 -0
- data/lib/fontist/cli/thor_ext.rb +0 -2
- data/lib/fontist/cli.rb +0 -9
- data/lib/fontist/collection_file.rb +0 -3
- data/lib/fontist/font.rb +0 -6
- data/lib/fontist/font_collection.rb +0 -1
- data/lib/fontist/font_file.rb +0 -1
- data/lib/fontist/font_installer.rb +0 -5
- data/lib/fontist/font_model.rb +0 -1
- data/lib/fontist/font_path.rb +0 -2
- data/lib/fontist/formula.rb +0 -13
- data/lib/fontist/formula_picker.rb +0 -2
- data/lib/fontist/google_import_source.rb +0 -2
- data/lib/fontist/import/convert_formulas.rb +0 -2
- data/lib/fontist/import/create_formula.rb +0 -4
- data/lib/fontist/import/files/collection_file.rb +0 -1
- data/lib/fontist/import/files.rb +8 -0
- data/lib/fontist/import/font_metadata_extractor.rb +0 -1
- data/lib/fontist/import/formula_builder.rb +0 -6
- data/lib/fontist/import/google/api.rb +0 -9
- data/lib/fontist/import/google/data_sources/base.rb +0 -1
- data/lib/fontist/import/google/data_sources/github.rb +0 -3
- data/lib/fontist/import/google/data_sources/ttf.rb +0 -2
- data/lib/fontist/import/google/data_sources/vf.rb +0 -2
- data/lib/fontist/import/google/data_sources/woff2.rb +0 -2
- data/lib/fontist/import/google/data_sources.rb +13 -0
- data/lib/fontist/import/google/font_database.rb +0 -10
- data/lib/fontist/import/google/metadata_adapter.rb +0 -1
- data/lib/fontist/import/google/models/font_family.rb +0 -1
- data/lib/fontist/import/google/models/metadata.rb +1 -9
- data/lib/fontist/import/google/models/source_metadata.rb +0 -1
- data/lib/fontist/import/google/models.rb +16 -0
- data/lib/fontist/import/google.rb +7 -2
- data/lib/fontist/import/google_fonts_importer.rb +0 -5
- data/lib/fontist/import/google_import.rb +1 -8
- data/lib/fontist/import/helpers.rb +8 -0
- data/lib/fontist/import/macos.rb +0 -6
- data/lib/fontist/import/manual_formula_builder.rb +0 -2
- data/lib/fontist/import/models.rb +7 -0
- data/lib/fontist/import/otf/font_file.rb +0 -2
- data/lib/fontist/import/otf.rb +7 -0
- data/lib/fontist/import/recursive_extraction.rb +0 -5
- data/lib/fontist/import/sil_import.rb +0 -3
- data/lib/fontist/import/upgrade_formulas.rb +1 -11
- data/lib/fontist/import.rb +23 -0
- data/lib/fontist/import_cli.rb +0 -9
- data/lib/fontist/index.rb +0 -4
- data/lib/fontist/index_cli.rb +0 -2
- data/lib/fontist/indexes/base_font_collection_index.rb +0 -1
- data/lib/fontist/indexes/default_family_font_index.rb +0 -2
- data/lib/fontist/indexes/directory_snapshot.rb +0 -2
- data/lib/fontist/indexes/filename_index.rb +0 -2
- data/lib/fontist/indexes/font_index.rb +0 -3
- data/lib/fontist/indexes/fontist_index.rb +0 -2
- data/lib/fontist/indexes/incremental_index_updater.rb +0 -4
- data/lib/fontist/indexes/preferred_family_font_index.rb +0 -2
- data/lib/fontist/indexes/system_index.rb +0 -2
- data/lib/fontist/indexes/user_index.rb +0 -2
- data/lib/fontist/indexes.rb +18 -0
- data/lib/fontist/install_location.rb +0 -4
- data/lib/fontist/install_locations/fontist_location.rb +0 -2
- data/lib/fontist/install_locations/system_location.rb +0 -2
- data/lib/fontist/install_locations/user_location.rb +0 -2
- data/lib/fontist/install_locations.rb +8 -0
- data/lib/fontist/macos/catalog/asset.rb +0 -2
- data/lib/fontist/macos/catalog/base_parser.rb +0 -1
- data/lib/fontist/macos/catalog/catalog_manager.rb +0 -6
- data/lib/fontist/macos/catalog/font3_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font4_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font5_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font6_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font7_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font8_parser.rb +0 -2
- data/lib/fontist/macos/catalog.rb +15 -0
- data/lib/fontist/macos.rb +5 -0
- data/lib/fontist/macos_import_source.rb +0 -2
- data/lib/fontist/manifest_request.rb +0 -1
- data/lib/fontist/manifest_response.rb +0 -1
- data/lib/fontist/resources.rb +7 -0
- data/lib/fontist/sil_import_source.rb +0 -2
- data/lib/fontist/system_font.rb +0 -2
- data/lib/fontist/system_index.rb +0 -4
- data/lib/fontist/utils/cache.rb +0 -2
- data/lib/fontist/utils/downloader.rb +0 -4
- data/lib/fontist/utils.rb +10 -8
- data/lib/fontist/validate_cli.rb +0 -4
- data/lib/fontist/validator.rb +0 -2
- data/lib/fontist/version.rb +1 -1
- data/lib/fontist.rb +82 -36
- metadata +19 -16
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Platform Guides
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Platform Guides
|
|
6
|
+
|
|
7
|
+
Fontist works consistently across macOS, Windows, and Linux, but each platform has unique characteristics and features.
|
|
8
|
+
|
|
9
|
+
## Available Platform Guides
|
|
10
|
+
|
|
11
|
+
### [macOS](/guide/platforms/macos)
|
|
12
|
+
|
|
13
|
+
Learn about:
|
|
14
|
+
- macOS supplementary fonts framework
|
|
15
|
+
- Framework versioning (Font3-Font8)
|
|
16
|
+
- Platform-specific font installation
|
|
17
|
+
- Version compatibility
|
|
18
|
+
|
|
19
|
+
### [Windows](/guide/platforms/windows)
|
|
20
|
+
|
|
21
|
+
Learn about:
|
|
22
|
+
- Windows font locations
|
|
23
|
+
- Administrator privileges
|
|
24
|
+
- File locking considerations
|
|
25
|
+
- Troubleshooting Windows-specific issues
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Comparison
|
|
30
|
+
|
|
31
|
+
| Feature | macOS | Windows | Linux |
|
|
32
|
+
|---------|-------|---------|-------|
|
|
33
|
+
| System fonts | `/Library/Fonts` | `C:\Windows\Fonts` | `/usr/share/fonts` |
|
|
34
|
+
| User fonts | `~/Library/Fonts` | `%LOCALAPPDATA%\...\Fonts` | `~/.local/share/fonts` |
|
|
35
|
+
| Supplementary fonts | ✅ Framework | ❌ | ❌ |
|
|
36
|
+
| Fontconfig | ✅ Optional | ✅ Optional | ✅ Recommended |
|
|
37
|
+
| Admin for system | Yes | Yes | Yes |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Platform-Specific Features
|
|
42
|
+
|
|
43
|
+
### macOS Supplementary Fonts
|
|
44
|
+
|
|
45
|
+
macOS includes a supplementary fonts framework for licensed fonts. Fontist can install these fonts automatically:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
fontist install "Canela"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
See the [macOS guide](/guide/platforms/macos) for details.
|
|
52
|
+
|
|
53
|
+
### Windows Font Management
|
|
54
|
+
|
|
55
|
+
Windows uses different font locations and has stricter file locking:
|
|
56
|
+
|
|
57
|
+
```powershell
|
|
58
|
+
# Install to user fonts (no admin needed)
|
|
59
|
+
fontist install "Roboto" --location user
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
See the [Windows guide](/guide/platforms/windows) for details.
|
|
63
|
+
|
|
64
|
+
### Linux Fontconfig
|
|
65
|
+
|
|
66
|
+
On Linux, Fontist integrates with fontconfig to make fonts available system-wide:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
fontist fontconfig update
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
See the [Fontconfig guide](/guide/fontconfig) for details.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: macOS Platform Guide
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# macOS Platform Guide
|
|
6
|
+
|
|
7
|
+
Fontist provides special support for macOS supplementary fonts, a framework introduced in macOS 10.12 (Sierra) for dynamically downloading licensed fonts on demand.
|
|
8
|
+
|
|
9
|
+
## Supplementary Fonts Overview
|
|
10
|
+
|
|
11
|
+
macOS provides a "supplementary fonts" framework (shared with iOS) for dynamically downloading and installing a wide range of licensed fonts. These fonts are typically commercial fonts that come free with macOS.
|
|
12
|
+
|
|
13
|
+
### Typical Use Cases
|
|
14
|
+
|
|
15
|
+
- CI jobs on macOS environments using specially-licensed fonts
|
|
16
|
+
- Automating installation of macOS add-on fonts
|
|
17
|
+
- Accessing platform-specific fonts not available elsewhere
|
|
18
|
+
|
|
19
|
+
::: warning Non-macOS Installation
|
|
20
|
+
Fontist does not allow installing macOS-specific fonts on non-macOS platforms due to font license restrictions.
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Framework Versioning
|
|
26
|
+
|
|
27
|
+
The macOS supplementary font catalog is bound to specific framework versions. Different versions contain different sets of fonts, and often different versions of the same fonts.
|
|
28
|
+
|
|
29
|
+
### Version Compatibility
|
|
30
|
+
|
|
31
|
+
| macOS Version | Framework Version | Platform Tag |
|
|
32
|
+
|---------------|-------------------|--------------|
|
|
33
|
+
| macOS 10.12 (Sierra) | Font 3 | `macos-font3` |
|
|
34
|
+
| macOS 10.13 (High Sierra) | Font 4 | `macos-font4` |
|
|
35
|
+
| macOS 10.14 (Mojave) | Font 5 | `macos-font5` |
|
|
36
|
+
| macOS 10.15 (Catalina) | Font 6 | `macos-font6` |
|
|
37
|
+
| macOS 11 (Big Sur) | Font 6 | `macos-font6` |
|
|
38
|
+
| macOS 12 (Monterey) | Font 7 | `macos-font7` |
|
|
39
|
+
| macOS 13 (Ventura) | Font 7 | `macos-font7` |
|
|
40
|
+
| macOS 14 (Sonoma) | Font 7 | `macos-font7` |
|
|
41
|
+
| macOS 15 (Sequoia) | Font 7 | `macos-font7` |
|
|
42
|
+
| macOS 26+ (Tahoe) | Font 8 | `macos-font8` |
|
|
43
|
+
|
|
44
|
+
### How Versioning Works
|
|
45
|
+
|
|
46
|
+
A macOS system can only download fonts from the catalog version corresponding to its framework version. Fontist respects this limitation when installing these fonts.
|
|
47
|
+
|
|
48
|
+
When you install a macOS add-on font, Fontist automatically detects your macOS version and installs the appropriate font version:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
fontist install "Al Bayan"
|
|
52
|
+
# On macOS 15: installs Font7 version formula
|
|
53
|
+
# On macOS 26: installs Font8 version formula
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This ensures you always get the font version compatible with your system.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Platform Tags
|
|
61
|
+
|
|
62
|
+
In Fontist Formulas, each supplementary font is backed by a formula specifying the font framework version using platform tags.
|
|
63
|
+
|
|
64
|
+
### Tag Format
|
|
65
|
+
|
|
66
|
+
Platform tags follow the pattern: `macos-fontX` where `X` is the catalog version number.
|
|
67
|
+
|
|
68
|
+
### Version Compatibility Checking
|
|
69
|
+
|
|
70
|
+
Fontist controls version compatibility through platform tags:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
# On macOS 14.2 (Sonoma), trying to install a Font8-only formula:
|
|
74
|
+
fontist install "Font8OnlyFont"
|
|
75
|
+
|
|
76
|
+
# Error output:
|
|
77
|
+
# Font 'Font8OnlyFont' is only available for: macos-font8.
|
|
78
|
+
# Your current platform is: macos. Your macOS version is: 14.2.1.
|
|
79
|
+
# This font requires macOS 26.0 or later.
|
|
80
|
+
# This font cannot be installed on your system.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Manual Installation Methods
|
|
86
|
+
|
|
87
|
+
On macOS, supplementary fonts can also be installed manually:
|
|
88
|
+
|
|
89
|
+
### Method 1: Application Trigger
|
|
90
|
+
|
|
91
|
+
User applications can trigger installation when needed, as described in Apple's ["DownloadFont" sample code](https://developer.apple.com/library/archive/samplecode/DownloadFont/Introduction/Intro.html).
|
|
92
|
+
|
|
93
|
+
### Method 2: Font Book
|
|
94
|
+
|
|
95
|
+
1. Open **Font Book.app**
|
|
96
|
+
2. Search for the desired font
|
|
97
|
+
3. Click "Download"
|
|
98
|
+
|
|
99
|
+
Both methods trigger a download from Apple's Mobile Asset Server.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Asset Catalog Locations
|
|
104
|
+
|
|
105
|
+
The asset catalog XML files are located at:
|
|
106
|
+
|
|
107
|
+
| Version | System Path |
|
|
108
|
+
|---------|-------------|
|
|
109
|
+
| Font 3 | `/System/Library/Assets/com_apple_MobileAsset_Font3/com_apple_MobileAsset_Font3.xml` |
|
|
110
|
+
| Font 4 | `/System/Library/Assets/com_apple_MobileAsset_Font4/com_apple_MobileAsset_Font4.xml` |
|
|
111
|
+
| Font 5 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font5/com_apple_MobileAsset_Font5.xml` |
|
|
112
|
+
| Font 6 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font6/com_apple_MobileAsset_Font6.xml` |
|
|
113
|
+
| Font 7 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font7/com_apple_MobileAsset_Font7.xml` |
|
|
114
|
+
| Font 8 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font8/com_apple_MobileAsset_Font8.xml` |
|
|
115
|
+
|
|
116
|
+
::: note Schema Differences
|
|
117
|
+
The Assets and AssetsV2 frameworks use slightly different Plist schemas.
|
|
118
|
+
:::
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Font Sources by macOS Version
|
|
123
|
+
|
|
124
|
+
For the complete list of available fonts on each macOS version, see Apple's support pages:
|
|
125
|
+
|
|
126
|
+
| macOS Version | Apple Support Link |
|
|
127
|
+
|---------------|-------------------|
|
|
128
|
+
| macOS 15 (Sequoia) | [Fonts included with macOS Sequoia](https://support.apple.com/en-us/120414) |
|
|
129
|
+
| macOS 14 (Sonoma) | [Fonts included with macOS Sonoma](https://support.apple.com/en-us/108939) |
|
|
130
|
+
|
|
131
|
+
::: note Older macOS Versions
|
|
132
|
+
Apple may remove or relocate support articles for older macOS versions. For Ventura, Monterey, Big Sur, and earlier versions, use Font Book on your Mac to view available fonts, or search Apple Support for the specific version.
|
|
133
|
+
:::
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Example: Installing Canela
|
|
138
|
+
|
|
139
|
+
Canela is a commercial font that comes free with macOS:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
fontist install Canela
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## See Also
|
|
148
|
+
|
|
149
|
+
- [How Fontist Works](/guide/how-it-works) - Architecture and indexes
|
|
150
|
+
- [Formulas Guide](/guide/formulas) - How formulas work
|
|
151
|
+
- [Fontist Blog: Installing macOS-specific add-on fonts](https://www.fontist.org/blog/2022-02-11-macos-fonts)
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Windows Platform Guide
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Windows Platform Guide
|
|
6
|
+
|
|
7
|
+
Fontist provides comprehensive Windows platform support, allowing installation and management of fonts on Windows 7 and later.
|
|
8
|
+
|
|
9
|
+
## Windows Font Management
|
|
10
|
+
|
|
11
|
+
Windows font management differs from Unix systems in several key ways:
|
|
12
|
+
|
|
13
|
+
| Difference | Description |
|
|
14
|
+
|------------|-------------|
|
|
15
|
+
| Path separator | Uses backslash (`\`) instead of forward slash (`/`) |
|
|
16
|
+
| Font locations | Registry-based and directory-based locations |
|
|
17
|
+
| File locking | Stricter file locking during operations |
|
|
18
|
+
| Permissions | Case-insensitive but case-preserving filesystem |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Windows Font Locations
|
|
23
|
+
|
|
24
|
+
Fontist supports three installation locations on Windows:
|
|
25
|
+
|
|
26
|
+
### System Fonts
|
|
27
|
+
|
|
28
|
+
| Property | Value |
|
|
29
|
+
|----------|-------|
|
|
30
|
+
| Location | `C:\Windows\Fonts` |
|
|
31
|
+
| Requires Admin | Yes |
|
|
32
|
+
| Available To | All users |
|
|
33
|
+
|
|
34
|
+
### User Fonts
|
|
35
|
+
|
|
36
|
+
| Property | Value |
|
|
37
|
+
|----------|-------|
|
|
38
|
+
| Location | `%LOCALAPPDATA%\Microsoft\Windows\Fonts` |
|
|
39
|
+
| Requires Admin | No |
|
|
40
|
+
| Available To | Current user only |
|
|
41
|
+
| Windows Version | Windows 10+ |
|
|
42
|
+
|
|
43
|
+
### Fontist Library
|
|
44
|
+
|
|
45
|
+
| Property | Value |
|
|
46
|
+
|----------|-------|
|
|
47
|
+
| Location | `%USERPROFILE%\.fontist\fonts` |
|
|
48
|
+
| Requires Admin | No |
|
|
49
|
+
| Available To | Current user only |
|
|
50
|
+
| Default | Yes |
|
|
51
|
+
|
|
52
|
+
Fontist creates a `fontist` subdirectory within user and system font directories to avoid cluttering the main font directory.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Installation Examples
|
|
57
|
+
|
|
58
|
+
### Install to Fontist Library (Default)
|
|
59
|
+
|
|
60
|
+
```powershell
|
|
61
|
+
# No administrator privileges required
|
|
62
|
+
fontist install "Roboto"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Install to User Fonts Directory
|
|
66
|
+
|
|
67
|
+
```powershell
|
|
68
|
+
# No administrator privileges required (Windows 10+)
|
|
69
|
+
fontist install "Roboto" --location=user
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Install to System Fonts Directory
|
|
73
|
+
|
|
74
|
+
```powershell
|
|
75
|
+
# Run as Administrator
|
|
76
|
+
fontist install "Roboto" --location=system
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Windows-Specific Considerations
|
|
82
|
+
|
|
83
|
+
### File Locking
|
|
84
|
+
|
|
85
|
+
Windows uses stricter file locking than Unix systems. Fontist handles this with automatic retry logic when encountering locked files during cleanup operations.
|
|
86
|
+
|
|
87
|
+
If you encounter file locking issues:
|
|
88
|
+
1. Close applications that might be using the font
|
|
89
|
+
2. Retry the operation
|
|
90
|
+
3. Use Task Manager to identify processes locking the file
|
|
91
|
+
|
|
92
|
+
### Path Handling
|
|
93
|
+
|
|
94
|
+
Fontist automatically handles Windows path separators and drive letters. Font paths are returned in Windows-native format:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
C:\Users\user\.fontist\fonts\font.ttf
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Registry Integration
|
|
101
|
+
|
|
102
|
+
While Windows historically used registry-based font registration, modern Windows (10+) supports directory-based fonts. Fontist uses directory-based installation for maximum compatibility and ease of management.
|
|
103
|
+
|
|
104
|
+
### Administrator Privileges
|
|
105
|
+
|
|
106
|
+
| Operation | Admin Required |
|
|
107
|
+
|-----------|----------------|
|
|
108
|
+
| Install to `fontist` location | No |
|
|
109
|
+
| Install to `user` location | No |
|
|
110
|
+
| Install to `system` location | Yes |
|
|
111
|
+
| Uninstall from system fonts | Yes |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Platform Compatibility
|
|
116
|
+
|
|
117
|
+
| Windows Version | Support Status | Notes |
|
|
118
|
+
|-----------------|----------------|-------|
|
|
119
|
+
| Windows 11 | ✅ Fully Supported | All features available |
|
|
120
|
+
| Windows 10 | ✅ Fully Supported | User font directory available |
|
|
121
|
+
| Windows 8/8.1 | ✅ Supported | System and fontist locations only |
|
|
122
|
+
| Windows 7 | ⚠️ Limited Support | System and fontist locations only |
|
|
123
|
+
|
|
124
|
+
::: warning Windows 7 Support
|
|
125
|
+
Extended support for Windows 7 ended January 14, 2020. Fontist is tested on Windows 10 and later. Earlier versions may work but are not actively tested.
|
|
126
|
+
:::
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Ruby Installation on Windows
|
|
131
|
+
|
|
132
|
+
### Prerequisites
|
|
133
|
+
|
|
134
|
+
1. **RubyInstaller with DevKit** - Required for native gem extensions
|
|
135
|
+
2. **MSYS2** - Required for building native extensions
|
|
136
|
+
3. **Git for Windows** - Required for `fontist update` and `fontist repo` commands
|
|
137
|
+
|
|
138
|
+
### Installation Steps
|
|
139
|
+
|
|
140
|
+
1. Download [RubyInstaller](https://rubyinstaller.org/downloads/) (select "Ruby+Devkit" version)
|
|
141
|
+
|
|
142
|
+
2. Run the installer and check "Add Ruby executables to your PATH"
|
|
143
|
+
|
|
144
|
+
3. After installation, run MSYS2 setup:
|
|
145
|
+
```powershell
|
|
146
|
+
ridk install
|
|
147
|
+
```
|
|
148
|
+
Select option 3 (MSYS2 and MINGW development toolchain) when prompted.
|
|
149
|
+
|
|
150
|
+
4. Install [Git for Windows](https://git-scm.com/download/win)
|
|
151
|
+
|
|
152
|
+
5. Install Fontist:
|
|
153
|
+
```powershell
|
|
154
|
+
gem install fontist
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Troubleshooting
|
|
160
|
+
|
|
161
|
+
### Native Extension Errors
|
|
162
|
+
|
|
163
|
+
If you see errors about failed compilations:
|
|
164
|
+
|
|
165
|
+
```powershell
|
|
166
|
+
# Ensure MSYS2 is properly installed
|
|
167
|
+
ridk install
|
|
168
|
+
|
|
169
|
+
# Reinstall the gem with verbose output
|
|
170
|
+
gem install fontist --verbose
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Permission Errors
|
|
174
|
+
|
|
175
|
+
If you get permission errors:
|
|
176
|
+
|
|
177
|
+
```powershell
|
|
178
|
+
# Option 1: Install to user directory
|
|
179
|
+
fontist install "Roboto" --location=user
|
|
180
|
+
|
|
181
|
+
# Option 2: Run as Administrator for system fonts
|
|
182
|
+
# Right-click PowerShell → "Run as administrator"
|
|
183
|
+
fontist install "Roboto" --location=system
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Path Too Long Errors
|
|
187
|
+
|
|
188
|
+
Windows has a 260 character path limit by default. If you encounter path issues:
|
|
189
|
+
|
|
190
|
+
1. Enable long paths in Windows (requires admin):
|
|
191
|
+
```powershell
|
|
192
|
+
# Run as Administrator
|
|
193
|
+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
|
|
194
|
+
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
2. Or use a shorter installation path via environment variable:
|
|
198
|
+
```powershell
|
|
199
|
+
$env:FONTIST_PATH = "C:\f"
|
|
200
|
+
fontist install "Roboto"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Environment Variables
|
|
206
|
+
|
|
207
|
+
| Variable | Description | Example |
|
|
208
|
+
|----------|-------------|---------|
|
|
209
|
+
| `FONTIST_PATH` | Base directory for Fontist data | `C:\fontist` |
|
|
210
|
+
| `FONTIST_INSTALL_LOCATION` | Default install location | `user` |
|
|
211
|
+
| `FONTIST_USER_FONTS_PATH` | Custom user fonts path | `C:\Users\me\Fonts` |
|
|
212
|
+
| `FONTIST_SYSTEM_FONTS_PATH` | Custom system fonts path | `C:\Windows\Fonts` |
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## See Also
|
|
217
|
+
|
|
218
|
+
- [Installation Guide](/guide/installation) - General installation instructions
|
|
219
|
+
- [Install Command](/cli/install) - CLI reference for install
|
|
220
|
+
- [How Fontist Works](/guide/how-it-works) - Architecture overview
|
data/fontist.gemspec
CHANGED
|
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.add_dependency "git", "> 1.0"
|
|
37
37
|
spec.add_dependency "json", "~> 2.0"
|
|
38
38
|
spec.add_dependency "lutaml-model", "~> 0.7"
|
|
39
|
-
spec.add_dependency "lutaml-xsd", "~> 1.0"
|
|
40
39
|
spec.add_dependency "marcel", "~> 1.0"
|
|
41
40
|
spec.add_dependency "nokogiri", "~> 1.0"
|
|
42
41
|
spec.add_dependency "octokit", "~> 4.0"
|
data/lib/fontist/cli/thor_ext.rb
CHANGED
data/lib/fontist/cli.rb
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
require "thor"
|
|
2
2
|
require_relative "cli/class_options"
|
|
3
3
|
require_relative "cli/thor_ext"
|
|
4
|
-
require_relative "repo_cli"
|
|
5
|
-
require_relative "cache_cli"
|
|
6
|
-
require_relative "import_cli"
|
|
7
|
-
require_relative "fontconfig_cli"
|
|
8
|
-
require_relative "config_cli"
|
|
9
|
-
require_relative "index_cli"
|
|
10
|
-
require_relative "manifest_cli"
|
|
11
4
|
|
|
12
5
|
module Fontist
|
|
13
6
|
class CLI < Thor
|
|
@@ -248,7 +241,6 @@ module Fontist
|
|
|
248
241
|
"e.g. 'Wine ' for compatibility fonts"
|
|
249
242
|
def create_formula(url)
|
|
250
243
|
handle_class_options(options)
|
|
251
|
-
require "fontist/import/create_formula"
|
|
252
244
|
name = Fontist::Import::CreateFormula.new(url, options).call
|
|
253
245
|
Fontist.ui.say("#{name} formula has been successfully created")
|
|
254
246
|
success
|
|
@@ -271,7 +263,6 @@ module Fontist
|
|
|
271
263
|
desc "macos-catalogs", "List available macOS font catalogs"
|
|
272
264
|
def macos_catalogs
|
|
273
265
|
handle_class_options(options)
|
|
274
|
-
require_relative "macos/catalog/catalog_manager"
|
|
275
266
|
|
|
276
267
|
catalogs = Fontist::Macos::Catalog::CatalogManager.available_catalogs
|
|
277
268
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require "fontisan"
|
|
2
|
-
require_relative "errors"
|
|
3
2
|
|
|
4
3
|
module Fontist
|
|
5
4
|
class CollectionFile
|
|
@@ -18,8 +17,6 @@ module Fontist
|
|
|
18
17
|
def build_collection(path)
|
|
19
18
|
# Validate collection by checking it can be loaded
|
|
20
19
|
# This uses fontisan's collection validation infrastructure
|
|
21
|
-
require "fontisan"
|
|
22
|
-
|
|
23
20
|
# First check if it's a valid collection file
|
|
24
21
|
unless Fontisan::FontLoader.collection?(path)
|
|
25
22
|
raise Errors::FontFileError,
|
data/lib/fontist/font.rb
CHANGED
data/lib/fontist/font_file.rb
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
require "fontist/utils"
|
|
2
1
|
require "excavate"
|
|
3
|
-
require_relative "resources/archive_resource"
|
|
4
|
-
require_relative "resources/google_resource"
|
|
5
|
-
require_relative "resources/apple_cdn_resource"
|
|
6
|
-
require_relative "install_location"
|
|
7
2
|
|
|
8
3
|
module Fontist
|
|
9
4
|
class FontInstaller
|
data/lib/fontist/font_model.rb
CHANGED
data/lib/fontist/font_path.rb
CHANGED
data/lib/fontist/formula.rb
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
require "lutaml/model"
|
|
2
|
-
require_relative "font_model"
|
|
3
|
-
require_relative "font_collection"
|
|
4
|
-
require_relative "extract"
|
|
5
|
-
require_relative "index"
|
|
6
|
-
require_relative "helpers"
|
|
7
|
-
require_relative "update"
|
|
8
|
-
require_relative "import_source"
|
|
9
|
-
require_relative "macos_import_source"
|
|
10
|
-
require_relative "google_import_source"
|
|
11
|
-
require_relative "sil_import_source"
|
|
12
2
|
require "git"
|
|
13
3
|
|
|
14
4
|
module Fontist
|
|
15
|
-
require "lutaml/model"
|
|
16
|
-
|
|
17
5
|
class Resource < Lutaml::Model::Serializable
|
|
18
6
|
attribute :name, :string
|
|
19
7
|
attribute :source, :string
|
|
@@ -280,7 +268,6 @@ module Fontist
|
|
|
280
268
|
# Check if framework exists for this macOS version
|
|
281
269
|
framework = Utils::System.catalog_version_for_macos
|
|
282
270
|
if framework.nil?
|
|
283
|
-
require_relative "macos_framework_metadata"
|
|
284
271
|
raise Errors::UnsupportedMacOSVersionError.new(
|
|
285
272
|
current_macos,
|
|
286
273
|
MacosFrameworkMetadata.metadata,
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
require "shellwords"
|
|
2
|
-
require_relative "text_helper"
|
|
3
|
-
require_relative "helpers/hash_helper"
|
|
4
|
-
require_relative "recursive_extraction"
|
|
5
|
-
require_relative "../macos_import_source"
|
|
6
|
-
require_relative "../google_import_source"
|
|
7
|
-
require_relative "../sil_import_source"
|
|
8
2
|
|
|
9
3
|
module Fontist
|
|
10
4
|
module Import
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
require_relative "models/axis"
|
|
2
|
-
require_relative "models/font_variant"
|
|
3
|
-
require_relative "models/font_family"
|
|
4
|
-
require_relative "data_sources/base"
|
|
5
|
-
require_relative "data_sources/ttf"
|
|
6
|
-
require_relative "data_sources/vf"
|
|
7
|
-
require_relative "data_sources/woff2"
|
|
8
|
-
require_relative "font_database"
|
|
9
|
-
|
|
10
1
|
module Fontist
|
|
11
2
|
module Import
|
|
12
3
|
module Google
|