Sha256: 7a42e03b407fcdc36b15e0d952b619fbd880e3c667d166e5e543a95602bf259a

Contents?: true

Size: 525 Bytes

Versions: 21

Compression:

Stored size: 525 Bytes

Contents

require_relative "base_index"

module Fontist
  module Indexes
    class DefaultFamilyFontIndex < BaseIndex
      def self.path
        Fontist.formula_index_path
      end

      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

      def normalize_key(key)
        key.downcase
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
fontist-1.21.2 lib/fontist/indexes/default_family_font_index.rb
fontist-1.21.1 lib/fontist/indexes/default_family_font_index.rb
fontist-1.20.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.19.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.18.2 lib/fontist/indexes/default_family_font_index.rb
fontist-1.17.1 lib/fontist/indexes/default_family_font_index.rb
fontist-1.17.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.16.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.15.2 lib/fontist/indexes/default_family_font_index.rb
fontist-1.15.1 lib/fontist/indexes/default_family_font_index.rb
fontist-1.15.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.6 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.5 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.4 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.3 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.2 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.1 lib/fontist/indexes/default_family_font_index.rb
fontist-1.14.0 lib/fontist/indexes/default_family_font_index.rb
fontist-1.13.2 lib/fontist/indexes/default_family_font_index.rb
fontist-1.13.1 lib/fontist/indexes/default_family_font_index.rb