Sha256: 13f26be2fdb060046250f25a867ed1e6e6c84f9363c6a3f9e84199f7d2fa5a8f
Contents?: true
Size: 674 Bytes
Versions: 1
Compression:
Stored size: 674 Bytes
Contents
require 'tempfile' module Fontana class TTF2EOT def self.convert(input_string) input_file = create_input_file(input_string) return_string = run_command(input_file) cleanup(input_file) return_string end private def self.cleanup(tempfile) tempfile.unlink end def self.create_input_file(content, filename = 'fontana-ttf2eot-input') tempfile = Tempfile.new([filename, '.ttf']) tempfile.write content tempfile.close tempfile end def self.run_command(input_file) puts "ttf2eot #{input_file.path}" `ttf2eot #{input_file.path}` end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fontana-0.0.1.rc1 | lib/fontana/ttf2eot.rb |