Sha256: 489fc06e806c48303e74bb3735d6e49eb92292e3061bda3041672786002aa72f

Contents?: true

Size: 568 Bytes

Versions: 34

Compression:

Stored size: 568 Bytes

Contents

require 'ttfunk/subset/unicode'
require 'ttfunk/subset/unicode_8bit'
require 'ttfunk/subset/mac_roman'
require 'ttfunk/subset/windows_1252'

module TTFunk
  module Subset
    def self.for(original, encoding)
      case encoding.to_sym
        when :unicode      then Unicode.new(original)
        when :unicode_8bit then Unicode8Bit.new(original)
        when :mac_roman    then MacRoman.new(original)
        when :windows_1252 then Windows1252.new(original)
        else raise NotImplementedError, "encoding #{encoding} is not supported"
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 10 rubygems

Version Path
ttfunk-1.2.2 lib/ttfunk/subset.rb
ttfunk-1.2.1 lib/ttfunk/subset.rb
ttfunk-1.2.0 lib/ttfunk/subset.rb
ttfunk-1.1.1 lib/ttfunk/subset.rb
ttfunk-1.1.0 lib/ttfunk/subset.rb
ttfunk-1.0.3 lib/ttfunk/subset.rb
ttfunk-1.0.2 lib/ttfunk/subset.rb
ttfunk-1.0.1 lib/ttfunk/subset.rb
davebenvenuti-prawn-0.11.1.pre vendor/ttfunk/lib/ttfunk/subset.rb
piglop-prawn-0.10.2.3 vendor/ttfunk/lib/ttfunk/subset.rb
piglop-prawn-0.10.2.2 vendor/ttfunk/lib/ttfunk/subset.rb
piglop-prawn-0.10.2.1 vendor/ttfunk/lib/ttfunk/subset.rb
glyph_imager-0.1.1 vendor/ttfunk/lib/ttfunk/subset.rb
prawn-0.11.1.pre vendor/ttfunk/lib/ttfunk/subset.rb
goodwill-prawn-edge-0.10.0 vendor/ttfunk/lib/ttfunk/subset.rb
alphasights-prawn-0.10.4 vendor/ttfunk/lib/ttfunk/subset.rb
alphasights-prawn-0.10.3 vendor/ttfunk/lib/ttfunk/subset.rb
alphasights-prawn-0.10.2 vendor/ttfunk/lib/ttfunk/subset.rb
alphasights-prawn-0.10.1 vendor/ttfunk/lib/ttfunk/subset.rb
glyph_imager-0.1.0 vendor/ttfunk/lib/ttfunk/subset.rb