class Fontist::Indexes::UserIndex
Index for fonts installed in the user font directory
This index tracks all fonts installed in the user-specific font location (platform-dependent, typically with /fontist subdirectory) using a singleton pattern to ensure consistent state across the application.
## Responsibilities
-
Maintain index of all user location fonts
-
Provide fast font lookups by name and style
-
Auto-rebuild when font directories change
-
Cacheresults for performance
## Index File
Located at: ~/.fontist/user_index.default_family.yml
## Platform-Specific Paths Indexed
-
macOS: ~/Library/Fonts/fontist/*/.{ttf,otf,ttc,otc}
-
Linux: ~/.local/share/fonts/fontist/*/.{ttf,otf,ttc,otc}
-
Windows: %LOCALAPPDATA%/Microsoft/Windows/Fonts/fontist/*/.{ttf,otf,ttc,otc}
## Usage
index = Fontist::Indexes::UserIndex.instance fonts = index.find("Arial", "Bold") index.add_font("/path/to/font.ttf") index.rebuild(verbose: true)