class Fontist::Indexes::DefaultFamilyFontIndex

Public Class Methods

path() click to toggle source
# File lib/fontist/indexes/default_family_font_index.rb, line 6
def self.path
  Fontist.formula_index_path
end

Public Instance Methods

add_formula(formula) click to toggle source
# File lib/fontist/indexes/default_family_font_index.rb, line 10
def add_formula(formula)
  formula.fonts.each do |font|
    font.styles.each do |style|
      font_name = style.default_family_name || font.name
      add_index_formula(font_name, formula.to_index_formula)
    end
  end
end
normalize_key(key) click to toggle source
# File lib/fontist/indexes/default_family_font_index.rb, line 19
def normalize_key(key)
  key.downcase
end