fontist 2.0.4 → 2.1.0
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/.github/workflows/discover-fonts.yml +91 -0
- data/.github/workflows/rake-metanorma.yaml +1 -1
- data/.github/workflows/rake.yml +170 -3
- data/.github/workflows/release.yml +3 -0
- data/.gitignore +13 -6
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.rubocop_todo.yml +20 -56
- data/Gemfile +7 -0
- data/README.adoc +1083 -149
- data/Rakefile +71 -1
- data/docs/google-fonts-multi-format-usage.md +419 -0
- data/docs/guide/index.md +3 -3
- data/fontist.gemspec +6 -5
- data/lib/fontist/cache/manager.rb +66 -0
- data/lib/fontist/cache/store.rb +93 -0
- data/lib/fontist/cache_cli.rb +63 -0
- data/lib/fontist/cli.rb +110 -34
- data/lib/fontist/collection_file.rb +122 -12
- data/lib/fontist/config.rb +84 -6
- data/lib/fontist/errors.rb +75 -1
- data/lib/fontist/font.rb +130 -13
- data/lib/fontist/font_file.rb +187 -70
- data/lib/fontist/font_installer.rb +57 -6
- data/lib/fontist/font_path.rb +23 -1
- data/lib/fontist/formula.rb +132 -2
- data/lib/fontist/google_import_source.rb +70 -0
- data/lib/fontist/import/create_formula.rb +60 -3
- data/lib/fontist/import/files/collection_file.rb +118 -22
- data/lib/fontist/import/files/font_detector.rb +69 -29
- data/lib/fontist/import/font_metadata_extractor.rb +69 -0
- data/lib/fontist/import/font_parsing_error_collector.rb +33 -0
- data/lib/fontist/import/font_style.rb +1 -1
- data/lib/fontist/import/formula_builder.rb +101 -18
- data/lib/fontist/import/google/api.rb +146 -5
- data/lib/fontist/import/google/data_sources/base.rb +100 -0
- data/lib/fontist/import/google/data_sources/github.rb +316 -0
- data/lib/fontist/import/google/data_sources/ttf.rb +22 -0
- data/lib/fontist/import/google/data_sources/vf.rb +29 -0
- data/lib/fontist/import/google/data_sources/woff2.rb +25 -0
- data/lib/fontist/import/google/font_database.rb +588 -0
- data/lib/fontist/import/google/metadata.proto +119 -0
- data/lib/fontist/import/google/metadata_adapter.rb +259 -0
- data/lib/fontist/import/google/metadata_parser.rb +93 -0
- data/lib/fontist/import/google/models/axis.rb +91 -0
- data/lib/fontist/import/google/models/axis_metadata.rb +26 -0
- data/lib/fontist/import/google/models/file_metadata.rb +22 -0
- data/lib/fontist/import/google/models/font_family.rb +220 -0
- data/lib/fontist/import/google/models/font_file_metadata.rb +32 -0
- data/lib/fontist/import/google/models/font_variant.rb +78 -0
- data/lib/fontist/import/google/models/metadata.rb +482 -0
- data/lib/fontist/import/google/models/source_metadata.rb +31 -0
- data/lib/fontist/import/google.rb +2 -0
- data/lib/fontist/import/google_fonts_importer.rb +293 -0
- data/lib/fontist/import/google_import.rb +106 -2
- data/lib/fontist/import/import_display.rb +285 -0
- data/lib/fontist/import/macos.rb +416 -25
- data/lib/fontist/import/models/font_metadata.rb +39 -0
- data/lib/fontist/import/otf/font_file.rb +40 -47
- data/lib/fontist/import/recursive_extraction.rb +42 -6
- data/lib/fontist/import/sil_import.rb +410 -21
- data/lib/fontist/import/upgrade_formulas.rb +499 -0
- data/lib/fontist/import.rb +9 -0
- data/lib/fontist/import_cli.rb +178 -10
- data/lib/fontist/import_source.rb +45 -0
- data/lib/fontist/index.rb +12 -8
- data/lib/fontist/index_cli.rb +370 -0
- data/lib/fontist/indexes/base_font_collection_index.rb +149 -0
- data/lib/fontist/indexes/directory_change.rb +112 -0
- data/lib/fontist/indexes/directory_snapshot.rb +69 -0
- data/lib/fontist/indexes/fontist_index.rb +49 -0
- data/lib/fontist/indexes/incremental_index_updater.rb +107 -0
- data/lib/fontist/indexes/incremental_scanner.rb +99 -0
- data/lib/fontist/indexes/index_mixin.rb +20 -0
- data/lib/fontist/indexes/system_index.rb +57 -0
- data/lib/fontist/indexes/user_index.rb +68 -0
- data/lib/fontist/install_location.rb +137 -0
- data/lib/fontist/install_locations/base_location.rb +305 -0
- data/lib/fontist/install_locations/fontist_location.rb +58 -0
- data/lib/fontist/install_locations/system_location.rb +198 -0
- data/lib/fontist/install_locations/user_location.rb +112 -0
- data/lib/fontist/macos/catalog/asset.rb +102 -0
- data/lib/fontist/macos/catalog/base_parser.rb +65 -0
- data/lib/fontist/macos/catalog/catalog_manager.rb +144 -0
- data/lib/fontist/macos/catalog/font3_parser.rb +13 -0
- data/lib/fontist/macos/catalog/font4_parser.rb +13 -0
- data/lib/fontist/macos/catalog/font5_parser.rb +13 -0
- data/lib/fontist/macos/catalog/font6_parser.rb +13 -0
- data/lib/fontist/macos/catalog/font7_parser.rb +13 -0
- data/lib/fontist/macos/catalog/font8_parser.rb +31 -0
- data/lib/fontist/macos_framework_metadata.rb +161 -0
- data/lib/fontist/macos_import_source.rb +98 -0
- data/lib/fontist/manifest.rb +79 -9
- data/lib/fontist/manifest_cli.rb +85 -0
- data/lib/fontist/manifest_response.rb +9 -9
- data/lib/fontist/memoizable.rb +67 -0
- data/lib/fontist/path_scanning.rb +42 -0
- data/lib/fontist/repo.rb +189 -14
- data/lib/fontist/repo_cli.rb +8 -1
- data/lib/fontist/resources/apple_cdn_resource.rb +51 -0
- data/lib/fontist/sil_import_source.rb +57 -0
- data/lib/fontist/system.yml +13 -3
- data/lib/fontist/system_font.rb +64 -2
- data/lib/fontist/system_index.rb +544 -22
- data/lib/fontist/utils/cache.rb +40 -9
- data/lib/fontist/utils/downloader.rb +16 -3
- data/lib/fontist/utils/file_ops.rb +85 -0
- data/lib/fontist/utils/locking.rb +5 -3
- data/lib/fontist/utils/system.rb +160 -3
- data/lib/fontist/utils/ui.rb +14 -0
- data/lib/fontist/utils.rb +77 -4
- data/lib/fontist/validate_cli.rb +206 -0
- data/lib/fontist/validation.rb +129 -0
- data/lib/fontist/validator.rb +264 -0
- data/lib/fontist/version.rb +1 -1
- data/lib/fontist.rb +48 -4
- data/lib/tasks/system_fonts.rake +75 -0
- data/script/capture_system_fonts +71 -0
- data/script/download_system_indexes +187 -0
- metadata +111 -31
- data/lib/fontist/import/files/file_requirement.rb +0 -17
- data/lib/fontist/import/google/create_google_formula.rb +0 -89
- data/lib/fontist/import/otf_parser.rb +0 -26
- data/lib/fontist/import/otf_style.rb +0 -39
- data/lib/fontist/import/otfinfo/otfinfo_requirement.rb +0 -22
- data/lib/fontist/import/otfinfo/template.erb +0 -26
- data/lib/fontist/import/otfinfo_generate.rb +0 -45
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe2ee2cb99a9102df6278b317e648f3a946e56d3d0d50fcc9fb5101d841feef8
|
|
4
|
+
data.tar.gz: a61cab7c8811164f9e41ffcadbf0fd2aad4c80aca1bbecbf1185938ca284382c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fae18dd24666f22cdfbab388e3a8d75e7794ec1cce032534e9aa32e04cc489811418c4ca8118003158461d2533d3bcc50dade9efa5a713b876313f06f42ad3a
|
|
7
|
+
data.tar.gz: c69eed8895cda7e35d80a208ebd19935c8c0ffba69cc9e58f6f27bbdff01f9ff4c15334a824b89f1d0168370c8f40cc2c8d250a4b1cc96097594ec5bcd6f9171
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: discover-fonts
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
tags: [ 'v*' ]
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- '**.adoc'
|
|
9
|
+
pull_request:
|
|
10
|
+
paths-ignore:
|
|
11
|
+
- '**.adoc'
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
discover-macos:
|
|
18
|
+
name: macOS ${{ matrix.version }} fonts
|
|
19
|
+
runs-on: macos-${{ matrix.version }}
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
version: [14, 15, 26]
|
|
23
|
+
fail-fast: false
|
|
24
|
+
steps:
|
|
25
|
+
- name: List ALL Core System Fonts
|
|
26
|
+
run: |
|
|
27
|
+
echo "=== ALL FONTS IN /System/Library/Fonts/ ==="
|
|
28
|
+
find /System/Library/Fonts/ -type f \( -name "*.ttf" -o -name "*.ttc" -o -name "*.otf" \) | sort
|
|
29
|
+
echo ""
|
|
30
|
+
echo "=== Total Count ==="
|
|
31
|
+
find /System/Library/Fonts/ -type f \( -name "*.ttf" -o -name "*.ttc" -o -name "*.otf" \) | wc -l
|
|
32
|
+
|
|
33
|
+
- name: Find and Display Catalogs
|
|
34
|
+
run: |
|
|
35
|
+
echo "=== Available Font Catalogs (XML) ==="
|
|
36
|
+
find /System/Library/AssetsV2/ -name "*.xml" -type f 2>/dev/null | sort || echo "No XML catalogs found"
|
|
37
|
+
echo ""
|
|
38
|
+
echo "=== Available Font Catalogs (Plist) ==="
|
|
39
|
+
find /System/Library/AssetsV2/ -name "*.plist" -type f 2>/dev/null | sort || echo "No plist files found"
|
|
40
|
+
echo ""
|
|
41
|
+
echo "=== All MobileAsset Font Files ==="
|
|
42
|
+
find /System/Library/AssetsV2/com_apple_MobileAsset_Font*/ -type f 2>/dev/null | sort || echo "No MobileAsset Font directory found"
|
|
43
|
+
echo ""
|
|
44
|
+
echo "=== Catalog Details ==="
|
|
45
|
+
for file in /System/Library/AssetsV2/com_apple_MobileAsset_Font*/*.{xml,plist}; do
|
|
46
|
+
if [ -f "$file" ]; then
|
|
47
|
+
catalog_dir=$(basename "$(dirname "$file")")
|
|
48
|
+
file_name=$(basename "$file")
|
|
49
|
+
file_size=$(wc -c < "$file" 2>/dev/null || echo 0)
|
|
50
|
+
file_type=$(file -b "$file" 2>/dev/null || echo "unknown")
|
|
51
|
+
echo "$catalog_dir/$file_name: $file_size bytes, type: $file_type"
|
|
52
|
+
fi
|
|
53
|
+
done
|
|
54
|
+
|
|
55
|
+
- name: Upload Catalogs
|
|
56
|
+
uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: macos-${{ matrix.version }}-catalogs
|
|
59
|
+
path: |
|
|
60
|
+
/System/Library/AssetsV2/com_apple_MobileAsset_Font*/*.xml
|
|
61
|
+
/System/Library/AssetsV2/com_apple_MobileAsset_Font*/*.plist
|
|
62
|
+
if-no-files-found: warn
|
|
63
|
+
|
|
64
|
+
discover-windows:
|
|
65
|
+
name: Windows ${{ matrix.version }} fonts
|
|
66
|
+
runs-on: windows-${{ matrix.version }}
|
|
67
|
+
strategy:
|
|
68
|
+
matrix:
|
|
69
|
+
version: [2022, 2025]
|
|
70
|
+
fail-fast: false
|
|
71
|
+
steps:
|
|
72
|
+
- name: List ALL Windows Fonts
|
|
73
|
+
shell: pwsh
|
|
74
|
+
run: |
|
|
75
|
+
Write-Host "=== ALL FONTS IN C:\Windows\Fonts\ ==="
|
|
76
|
+
Get-ChildItem -Path "C:\Windows\Fonts\" -Include *.ttf,*.ttc,*.otf -Recurse | ForEach-Object { $_.FullName } | Sort-Object
|
|
77
|
+
Write-Host ""
|
|
78
|
+
Write-Host "=== Total Count ==="
|
|
79
|
+
(Get-ChildItem -Path "C:\Windows\Fonts\" -Include *.ttf,*.ttc,*.otf -Recurse).Count
|
|
80
|
+
|
|
81
|
+
discover-linux:
|
|
82
|
+
name: Linux fonts
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- name: List ALL System Fonts
|
|
86
|
+
run: |
|
|
87
|
+
echo "=== ALL FONTS IN /usr/share/fonts/ ==="
|
|
88
|
+
find /usr/share/fonts/ -type f \( -name "*.ttf" -o -name "*.ttc" -o -name "*.otf" \) | sort
|
|
89
|
+
echo ""
|
|
90
|
+
echo "=== Total Count ==="
|
|
91
|
+
find /usr/share/fonts/ -type f \( -name "*.ttf" -o -name "*.ttc" -o -name "*.otf" \) | wc -l
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -15,7 +15,7 @@ concurrency:
|
|
|
15
15
|
cancel-in-progress: true
|
|
16
16
|
|
|
17
17
|
env:
|
|
18
|
-
BUNDLER_VER:
|
|
18
|
+
BUNDLER_VER: latest
|
|
19
19
|
# Forcing bundler version to ensure that it is consistent everywhere and
|
|
20
20
|
# does not cause bundler gem reinstalls
|
|
21
21
|
# bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
|
|
@@ -40,6 +40,12 @@ jobs:
|
|
|
40
40
|
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
|
41
41
|
|
|
42
42
|
steps:
|
|
43
|
+
- if: startsWith(matrix.os, 'windows')
|
|
44
|
+
name: Pre-clone formulas repo on Windows
|
|
45
|
+
run: |
|
|
46
|
+
git clone --branch v4 --depth 1 https://github.com/fontist/formulas.git C:\temp\fontist\versions\v4\formulas
|
|
47
|
+
shell: powershell
|
|
48
|
+
|
|
43
49
|
- uses: actions/checkout@v4
|
|
44
50
|
|
|
45
51
|
- uses: ruby/setup-ruby@v1
|
|
@@ -49,8 +55,169 @@ jobs:
|
|
|
49
55
|
bundler: ${{ env.BUNDLER_VER }}
|
|
50
56
|
bundler-cache: true
|
|
51
57
|
|
|
52
|
-
-
|
|
53
|
-
run:
|
|
58
|
+
- name: Build and display fontist system index
|
|
59
|
+
run: |
|
|
60
|
+
echo "=== Building Fontist System Index ==="
|
|
61
|
+
bundle exec fontist index rebuild --verbose
|
|
62
|
+
echo ""
|
|
63
|
+
echo "=== System Index Path ==="
|
|
64
|
+
bundle exec fontist index path
|
|
65
|
+
echo ""
|
|
66
|
+
echo "=== First 50 Fonts (YAML) ==="
|
|
67
|
+
bundle exec fontist index list --format yaml --limit 50
|
|
68
|
+
|
|
69
|
+
- name: Copy index files for artifact upload
|
|
70
|
+
if: always()
|
|
71
|
+
shell: bash
|
|
72
|
+
run: |
|
|
73
|
+
echo "=== Debugging file locations ==="
|
|
74
|
+
echo "HOME is: $HOME"
|
|
75
|
+
echo "Checking if .fontist directory exists:"
|
|
76
|
+
ls -la $HOME/.fontist/ || echo ".fontist directory not found"
|
|
77
|
+
echo ""
|
|
78
|
+
echo "Looking for system_index files:"
|
|
79
|
+
find $HOME/.fontist -name "system_index*.yml" -type f 2>/dev/null || echo "No system_index files found"
|
|
80
|
+
echo ""
|
|
81
|
+
echo "Creating artifacts directory..."
|
|
82
|
+
mkdir -p ./artifacts
|
|
83
|
+
echo ""
|
|
84
|
+
echo "Copying index files..."
|
|
85
|
+
cp $HOME/.fontist/system_index.default_family.yml ./artifacts/ 2>/dev/null && echo " ✓ Copied system_index.default_family.yml" || echo " ✗ Failed to copy system_index.default_family.yml"
|
|
86
|
+
cp $HOME/.fontist/system_index.preferred_family.yml ./artifacts/ 2>/dev/null && echo " ✓ Copied system_index.preferred_family.yml" || echo " ✗ File not found or copy failed"
|
|
87
|
+
echo ""
|
|
88
|
+
echo "Artifacts directory contents:"
|
|
89
|
+
ls -la ./artifacts/ || echo "Artifacts directory is empty"
|
|
90
|
+
|
|
91
|
+
- name: Test macOS supplementary font installation
|
|
92
|
+
if: startsWith(matrix.os, 'macos')
|
|
93
|
+
shell: bash
|
|
94
|
+
run: |
|
|
95
|
+
echo "========================================================================="
|
|
96
|
+
echo " macOS Supplementary Font Installation Test"
|
|
97
|
+
echo "========================================================================="
|
|
98
|
+
echo ""
|
|
99
|
+
echo "Platform: macOS $(sw_vers -productVersion)"
|
|
100
|
+
echo "Runner: ${{ matrix.os }}"
|
|
101
|
+
echo ""
|
|
102
|
+
|
|
103
|
+
echo "--- Step 1: Check Font Catalog Availability ---"
|
|
104
|
+
if [ -d "/System/Library/AssetsV2" ]; then
|
|
105
|
+
echo "✓ AssetsV2 directory exists"
|
|
106
|
+
CATALOG_COUNT=$(ls -d /System/Library/AssetsV2/com_apple_MobileAsset_Font* 2>/dev/null | wc -l)
|
|
107
|
+
echo " Found $CATALOG_COUNT font catalog(s):"
|
|
108
|
+
ls -d /System/Library/AssetsV2/com_apple_MobileAsset_Font* 2>/dev/null | while read catalog; do
|
|
109
|
+
echo " - $(basename $catalog)"
|
|
110
|
+
done
|
|
111
|
+
else
|
|
112
|
+
echo "✗ AssetsV2 directory not found"
|
|
113
|
+
echo " Supplementary fonts may not be available on this macOS version"
|
|
114
|
+
exit 0
|
|
115
|
+
fi
|
|
116
|
+
echo ""
|
|
117
|
+
|
|
118
|
+
echo "--- Step 2: List Available Supplementary Fonts ---"
|
|
119
|
+
echo "Querying fontist for macOS catalog information..."
|
|
120
|
+
bundle exec fontist import macos-catalogs 2>&1 || echo " (Command may not be fully implemented yet)"
|
|
121
|
+
echo ""
|
|
122
|
+
|
|
123
|
+
echo "--- Step 3: Check System Index for Installed Fonts ---"
|
|
124
|
+
echo "Rebuilding system font index to get current state..."
|
|
125
|
+
bundle exec fontist index rebuild --verbose > /dev/null 2>&1
|
|
126
|
+
TOTAL_FONTS=$(bundle exec fontist index list --format yaml --limit 99999 2>/dev/null | grep -c "^- path:" || echo "0")
|
|
127
|
+
echo "✓ System currently has $TOTAL_FONTS fonts indexed"
|
|
128
|
+
echo ""
|
|
129
|
+
|
|
130
|
+
echo "--- Step 4: Find a Supplementary Font to Install ---"
|
|
131
|
+
echo "Checking common macOS supplementary fonts..."
|
|
132
|
+
|
|
133
|
+
# List of common macOS supplementary fonts that are good test candidates
|
|
134
|
+
TEST_FONTS=(
|
|
135
|
+
"Al Bayan"
|
|
136
|
+
"Al Nile"
|
|
137
|
+
"Al Tarikh"
|
|
138
|
+
"Baghdad"
|
|
139
|
+
"Farisi"
|
|
140
|
+
"Geeza Pro"
|
|
141
|
+
"Hiragino Sans GB"
|
|
142
|
+
"Noto Sans Myanmar"
|
|
143
|
+
"Noto Serif Myanmar"
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
FONT_TO_INSTALL=""
|
|
147
|
+
for font in "${TEST_FONTS[@]}"; do
|
|
148
|
+
echo -n " Checking '$font'... "
|
|
149
|
+
if bundle exec fontist list "$font" 2>&1 | grep -q "not found\|Unsupported font"; then
|
|
150
|
+
echo "NOT INSTALLED ← Will install this"
|
|
151
|
+
FONT_TO_INSTALL="$font"
|
|
152
|
+
break
|
|
153
|
+
else
|
|
154
|
+
echo "already available"
|
|
155
|
+
fi
|
|
156
|
+
done
|
|
157
|
+
echo ""
|
|
158
|
+
|
|
159
|
+
if [ -z "$FONT_TO_INSTALL" ]; then
|
|
160
|
+
echo "ℹ All tested supplementary fonts are already installed"
|
|
161
|
+
echo " This indicates either:"
|
|
162
|
+
echo " - Fonts are pre-installed on this macOS version"
|
|
163
|
+
echo " - Fonts are not available in the catalog"
|
|
164
|
+
echo ""
|
|
165
|
+
echo "Attempting to install Al Bayan anyway to verify functionality..."
|
|
166
|
+
FONT_TO_INSTALL="Al Bayan"
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
echo "--- Step 5: Install '$FONT_TO_INSTALL' ---"
|
|
170
|
+
echo "Running: fontist install '$FONT_TO_INSTALL' --accept-all-licenses --force"
|
|
171
|
+
echo ""
|
|
172
|
+
if bundle exec fontist install "$FONT_TO_INSTALL" --accept-all-licenses --force 2>&1; then
|
|
173
|
+
echo ""
|
|
174
|
+
echo "✓ Installation command completed"
|
|
175
|
+
else
|
|
176
|
+
EXIT_CODE=$?
|
|
177
|
+
echo ""
|
|
178
|
+
echo "✗ Installation failed with exit code: $EXIT_CODE"
|
|
179
|
+
echo " This may indicate:"
|
|
180
|
+
echo " - Font is not available as a supplementary font"
|
|
181
|
+
echo " - Formula does not exist yet"
|
|
182
|
+
echo " - Platform limitation"
|
|
183
|
+
fi
|
|
184
|
+
echo ""
|
|
185
|
+
|
|
186
|
+
echo "--- Step 6: Verify Installation Status ---"
|
|
187
|
+
echo "Rebuilding index to check for newly installed fonts..."
|
|
188
|
+
bundle exec fontist index rebuild --verbose > /dev/null 2>&1
|
|
189
|
+
TOTAL_FONTS_AFTER=$(bundle exec fontist index list --format yaml --limit 99999 2>/dev/null | grep -c "^- path:" || echo "0")
|
|
190
|
+
echo "✓ System now has $TOTAL_FONTS_AFTER fonts indexed"
|
|
191
|
+
|
|
192
|
+
if [ "$TOTAL_FONTS_AFTER" -gt "$TOTAL_FONTS" ]; then
|
|
193
|
+
ADDED=$((TOTAL_FONTS_AFTER - TOTAL_FONTS))
|
|
194
|
+
echo "✓ SUCCESS: $ADDED new font(s) added"
|
|
195
|
+
else
|
|
196
|
+
echo "ℹ No new fonts added (may have been already installed)"
|
|
197
|
+
fi
|
|
198
|
+
echo ""
|
|
199
|
+
|
|
200
|
+
echo "Checking if '$FONT_TO_INSTALL' is now available:"
|
|
201
|
+
if bundle exec fontist list "$FONT_TO_INSTALL" 2>&1; then
|
|
202
|
+
echo ""
|
|
203
|
+
echo "✓ Font is available"
|
|
204
|
+
else
|
|
205
|
+
echo ""
|
|
206
|
+
echo "✗ Font still not found"
|
|
207
|
+
fi
|
|
208
|
+
echo ""
|
|
209
|
+
|
|
210
|
+
echo "========================================================================="
|
|
211
|
+
echo " Test Complete"
|
|
212
|
+
echo "========================================================================="
|
|
213
|
+
|
|
214
|
+
- name: Upload system index as artifact
|
|
215
|
+
if: always()
|
|
216
|
+
uses: actions/upload-artifact@v4
|
|
217
|
+
with:
|
|
218
|
+
name: system-index-${{ matrix.os }}-ruby-${{ matrix.ruby.version }}
|
|
219
|
+
path: ./artifacts/
|
|
220
|
+
if-no-files-found: ignore
|
|
54
221
|
|
|
55
222
|
- run: bundle exec rake
|
|
56
223
|
|
data/.gitignore
CHANGED
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
Gemfile.lock
|
|
10
10
|
|
|
11
11
|
# fonts
|
|
12
|
-
/spec/fixtures/fonts/*
|
|
13
|
-
/spec/fixtures/fonts/DejaVuSerif.ttf
|
|
14
|
-
/spec/fixtures/formulas/
|
|
15
|
-
/spec/fixtures/*
|
|
16
|
-
!/spec/fixtures/system.yml
|
|
12
|
+
# /spec/fixtures/fonts/*
|
|
13
|
+
# /spec/fixtures/fonts/DejaVuSerif.ttf
|
|
14
|
+
# /spec/fixtures/formulas/
|
|
15
|
+
# /spec/fixtures/*
|
|
16
|
+
# !/spec/fixtures/system.yml
|
|
17
|
+
# !/spec/fixtures/google_fonts/
|
|
17
18
|
|
|
18
19
|
# rspec failure tracking
|
|
19
20
|
.rspec_status
|
|
@@ -23,4 +24,10 @@ Gemfile.lock
|
|
|
23
24
|
|
|
24
25
|
# VS Code
|
|
25
26
|
.vscode
|
|
26
|
-
|
|
27
|
+
.kilocode
|
|
28
|
+
.claude
|
|
29
|
+
old-docs/
|
|
30
|
+
.md
|
|
31
|
+
|
|
32
|
+
# macOS font catalogs (downloaded via rake task)
|
|
33
|
+
/spec/fixtures/macos_catalogs/com_apple_MobileAsset_Font*.xml
|
data/.gitmodules
ADDED
data/.rspec
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,76 +1,40 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2026-01-21 22:46:14 UTC using RuboCop version 1.82.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 25
|
|
10
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes,
|
|
11
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
12
12
|
# URISchemes: http, https
|
|
13
13
|
Layout/LineLength:
|
|
14
|
-
Enabled: false
|
|
15
|
-
|
|
16
|
-
# Offense count: 1
|
|
17
|
-
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
18
|
-
Lint/DuplicateBranch:
|
|
19
|
-
Exclude:
|
|
20
|
-
- 'lib/fontist/helpers.rb'
|
|
21
|
-
|
|
22
|
-
# Offense count: 10
|
|
23
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
24
|
-
Metrics/AbcSize:
|
|
25
14
|
Exclude:
|
|
26
|
-
- '
|
|
27
|
-
- '
|
|
28
|
-
- 'lib/fontist/import/google_fonts_importer.rb'
|
|
29
|
-
- 'lib/fontist/import/google_importer.rb'
|
|
30
|
-
- 'lib/fontist/import/otf_style.rb'
|
|
31
|
-
- 'lib/fontist/indexes/index_mixin.rb'
|
|
32
|
-
- 'lib/fontist/manifest_request.rb'
|
|
33
|
-
- 'lib/fontist/update.rb'
|
|
34
|
-
- 'test-transform.rb'
|
|
15
|
+
- 'spec/fontist/manifest_spec.rb'
|
|
16
|
+
- 'spec/support/platform_fonts.rb'
|
|
35
17
|
|
|
36
|
-
# Offense count:
|
|
37
|
-
#
|
|
38
|
-
|
|
18
|
+
# Offense count: 1
|
|
19
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
20
|
+
# Configuration parameters: AllowComments.
|
|
21
|
+
Lint/EmptyConditionalBody:
|
|
39
22
|
Exclude:
|
|
40
|
-
- '
|
|
41
|
-
- 'lib/fontist/import/google_importer.rb'
|
|
42
|
-
- 'spec/fontist/import/create_formula_spec.rb'
|
|
43
|
-
- 'test-transform.rb'
|
|
23
|
+
- 'spec/fontist/manifest_spec.rb'
|
|
44
24
|
|
|
45
|
-
# Offense count:
|
|
25
|
+
# Offense count: 8
|
|
46
26
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# Offense count: 4
|
|
51
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
52
|
-
Metrics/PerceivedComplexity:
|
|
53
|
-
Exclude:
|
|
54
|
-
- 'lib/fontist/cli.rb'
|
|
55
|
-
- 'lib/fontist/cli/thor_ext.rb'
|
|
56
|
-
- 'lib/fontist/import/google_importer.rb'
|
|
57
|
-
- 'test-transform.rb'
|
|
58
|
-
|
|
59
|
-
# Offense count: 1
|
|
60
|
-
# Configuration parameters: MinSize.
|
|
61
|
-
Performance/CollectionLiteralInLoop:
|
|
62
|
-
Exclude:
|
|
63
|
-
- 'lib/fontist/import/otf/font_file.rb'
|
|
27
|
+
# AllowedMethods: refine
|
|
28
|
+
Metrics/BlockLength:
|
|
29
|
+
Max: 320
|
|
64
30
|
|
|
65
31
|
# Offense count: 2
|
|
66
|
-
#
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- 'lib/fontist/helpers.rb'
|
|
32
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
33
|
+
Metrics/MethodLength:
|
|
34
|
+
Max: 14
|
|
70
35
|
|
|
71
36
|
# Offense count: 1
|
|
72
|
-
#
|
|
73
|
-
|
|
74
|
-
Style/StringConcatenation:
|
|
37
|
+
# Configuration parameters: MinBranchesCount.
|
|
38
|
+
Style/HashLikeCase:
|
|
75
39
|
Exclude:
|
|
76
|
-
- 'spec/
|
|
40
|
+
- 'spec/support/platform_fonts.rb'
|
data/Gemfile
CHANGED
|
@@ -4,6 +4,7 @@ source "https://rubygems.org"
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
gem "bundler"
|
|
7
|
+
gem "openssl", "~> 3.0"
|
|
7
8
|
gem "pry"
|
|
8
9
|
gem "rake"
|
|
9
10
|
gem "rspec"
|
|
@@ -12,5 +13,11 @@ gem "rubocop"
|
|
|
12
13
|
gem "rubocop-performance"
|
|
13
14
|
gem "rubocop-rails"
|
|
14
15
|
gem "rubocop-rake"
|
|
16
|
+
gem "simplecov"
|
|
15
17
|
gem "vcr"
|
|
16
18
|
gem "webmock"
|
|
19
|
+
|
|
20
|
+
# Profiling tools (development only)
|
|
21
|
+
# gem "ruby-prof", "~> 1.7"
|
|
22
|
+
# stackprof uses Unix-specific system calls and doesn't compile on Windows
|
|
23
|
+
# gem "stackprof", "~> 0.2", install_if: -> { RUBY_PLATFORM !~ /mingw|mswin/ }
|