Sha256: 3e786e662fd6b39f140505ff3c39b8c666165c114f6e09d1fbaa12ce3dce52c8
Contents?: true
Size: 937 Bytes
Versions: 15
Compression:
Stored size: 937 Bytes
Contents
require 'phantom_svg' require 'emojidex/collection' def clean_vectors(emoji) start_time = Time.now emoji.each do |moji| phantom_svg = Phantom::SVG::Base.new("#{emoji.source_path}/#{moji.code}.svg") # Set size again just in case phantom_svg.width = phantom_svg.height = 64 # Re-render SVG puts "Re-rendering: #{emoji.source_path}/#{moji.code}.svg" phantom_svg.save_svg("#{emoji.source_path}/#{moji.code}.svg") phantom_svg.reset phantom_svg = nil GC.start end run_time = Time.now - start_time puts "Total Converstion Time: #{run_time}" end utf = Emojidex::Collection.new(nil, File.expand_path('../../emoji/utf', __FILE__)) puts "Opening UTF collection with #{utf.emoji.count} emoji" clean_vectors(utf) extended = Emojidex::Collection.new(nil, File.expand_path('../../emoji/extended', __FILE__)) puts "Opening Extended collection with #{extended.emoji.count} emoji" clean_vectors(extended)
Version data entries
15 entries across 15 versions & 1 rubygems