Class: Fontist::Indexes::FontistIndex

Inherits:
BaseFontCollectionIndex show all
Defined in:
lib/fontist/indexes/fontist_index.rb

Overview

Index for fonts installed in the fontist library

This index tracks all fonts installed in ~/.fontist/fonts/formula-key/ using a singleton pattern to ensure consistent state across the application.

## Responsibilities

  • Maintain index of all fontist-managed fonts

  • Provide fast font lookups by name and style

  • Auto-rebuild when font directories change

  • Cache results for performance

## Index File

Located at: ~/.fontist/fontist_index.default_family.yml

## Usage

index = Fontist::Indexes::FontistIndex.instance
fonts = index.find("Roboto", "Regular")
index.add_font("/path/to/font.ttf")
index.rebuild(verbose: true)

Method Summary

Methods inherited from BaseFontCollectionIndex

#add_font, #collection, #find, #font_exists?, #fonts, #initialize, #read_only_mode, #rebuild, #remove_font, reset_cache, #reset_cache

Constructor Details

This class inherits a constructor from Fontist::Indexes::BaseFontCollectionIndex