Sha256: 20a6faeb89b798ed89cf6e5cf43fd0a6709e23beedfdbc0dbd493ac0ea27d700

Contents?: true

Size: 410 Bytes

Versions: 17

Compression:

Stored size: 410 Bytes

Contents

module Fontist
  class FontistFont
    def initialize(font_name:)
      @font_name = font_name
    end

    def self.find(name)
      new(font_name: name).find
    end

    def find
      styles = FormulaPaths.new(font_paths).find(@font_name)
      return unless styles

      styles.map { |x| x[:path] }
    end

    private

    def font_paths
      Dir.glob(Fontist.fonts_path.join("**"))
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fontist-1.9.3 lib/fontist/fontist_font.rb
fontist-1.9.2 lib/fontist/fontist_font.rb
fontist-1.9.1 lib/fontist/fontist_font.rb
fontist-1.9.0 lib/fontist/fontist_font.rb
fontist-1.8.13 lib/fontist/fontist_font.rb
fontist-1.8.12 lib/fontist/fontist_font.rb
fontist-1.8.11 lib/fontist/fontist_font.rb
fontist-1.8.10 lib/fontist/fontist_font.rb
fontist-1.8.9 lib/fontist/fontist_font.rb
fontist-1.8.8 lib/fontist/fontist_font.rb
fontist-1.8.7 lib/fontist/fontist_font.rb
fontist-1.8.6 lib/fontist/fontist_font.rb
fontist-1.8.5 lib/fontist/fontist_font.rb
fontist-1.8.4 lib/fontist/fontist_font.rb
fontist-1.8.3 lib/fontist/fontist_font.rb
fontist-1.8.2 lib/fontist/fontist_font.rb
fontist-1.8.1 lib/fontist/fontist_font.rb