Sha256: aa2c73a28f990011f933548a8edd3dc5415e12538e55fc10c451b029ed4b894d

Contents?: true

Size: 586 Bytes

Versions: 28

Compression:

Stored size: 586 Bytes

Contents

require_relative "otfinfo/otfinfo_requirement"
require_relative "text_helper"

module Fontist
  module Import
    class OtfParser
      REQUIREMENTS = {
        otfinfo: Fontist::Import::Otfinfo::OtfinfoRequirement.new,
      }.freeze

      def initialize(path)
        @path = path
      end

      def call
        text = REQUIREMENTS[:otfinfo].call(@path)
        text.split("\n")
          .select { |x| x.include?(":") }
          .map { |x| x.split(":", 2) }
          .map { |x| x.map { |y| Fontist::Import::TextHelper.cleanup(y) } }
          .to_h
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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