class Fontist::Indexes::SystemIndex
Index for fonts in system font directories
This index tracks all fonts in platform-specific system font directories using a singleton pattern to ensure consistent state across the application.
## Responsibilities
-
Maintain index of all system-installed fonts
-
Provide fast font lookups by name and style
-
Auto-rebuild when font directories change
-
Cacheresults for performance
## Index File
Located at: ~/.fontist/system_index.default_family.yml
## Platform-Specific Paths Indexed
Scans all system font directories as defined in system.yml:
-
macOS: /System/Library/Fonts/, /Library/Fonts/, ~/Library/Fonts/
-
Linux: /usr/share/fonts/, /usr/local/share/fonts/, ~/.fonts/
-
Windows: %windir%/Fonts/, various system directories
## Usage
index = Fontist::Indexes::SystemIndex.instance fonts = index.find("Arial", "Bold") index.add_font("/Library/Fonts/Arial.ttf") index.rebuild(verbose: true)