Sha256: 6d02e1e401489b81dd14ff19780a21811209ab4e86107b080044d37007cab561

Contents?: true

Size: 784 Bytes

Versions: 25

Compression:

Stored size: 784 Bytes

Contents

module Fontist
  module Import
    class OtfStyle
      def initialize(info, path)
        @info = info
        @path = path
      end

      def call
        style = { family_name: @info["Preferred family"] || @info["Family"],
                  style: @info["Preferred subfamily"] || @info["Subfamily"],
                  full_name: @info["Full name"],
                  post_script_name: @info["PostScript name"],
                  version: version(@info["Version"]),
                  description: @info["Description"],
                  filename: File.basename(@path),
                  copyright: @info["Copyright"] }

        OpenStruct.new(style)
      end

      private

      def version(text)
        Fontist::Import::Google.style_version(text)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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