Class: Fontist::Indexes::PreferredFamilyFontIndex
  
  
  
  
  
    - Inherits:
 
    - 
      BaseIndex
      
        
          - Object
 
          
            - BaseIndex
 
          
            - Fontist::Indexes::PreferredFamilyFontIndex
 
          
        
        show all
      
     
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/fontist/indexes/preferred_family_font_index.rb
 
  
  
 
  
    
      Class Method Summary
      collapse
    
    
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods inherited from BaseIndex
  #add_index_formula, #build, from_yaml, #initialize, #load_formulas, #load_index_formulas, rebuild, reset_cache, #to_h, #to_yaml
  
  
    Instance Method Details
    
      
  
  
    
      
10
11
12
13
14
15
16
17 
     | 
    
      # File 'lib/fontist/indexes/preferred_family_font_index.rb', line 10
def add_formula(formula)
  formula.fonts.each do |font|
    font.styles.each do |style|
      font_name = style.preferred_family_name || font.name
      add_index_formula(font_name, formula.to_index_formula)
    end
  end
end
     | 
  
 
    
      
  
  
    #normalize_key(key)  ⇒ Object 
  
  
  
  
    
      
19
20
21 
     | 
    
      # File 'lib/fontist/indexes/preferred_family_font_index.rb', line 19
def normalize_key(key)
  key.downcase
end 
     |