magic_cloud icon indicating copy to clipboard operation
magic_cloud copied to clipboard

text string contains image attribute reference `%m

Open Flipez opened this issue 8 years ago • 1 comments

/home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:70:in `get_type_metrics': text string contains image attribute reference `%m' (ArgumentError)
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:70:in `_measure_text'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/canvas.rb:43:in `measure_text'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/word.rb:23:in `measure'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:32:in `make_sprite'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:20:in `block in make_sprites!'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:19:in `each'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/spriter.rb:19:in `make_sprites!'
	from /home/robert/git/project-nacho/vendor/bundle/ruby/2.3.0/bundler/gems/magic_cloud-d4d37d05b0f8/lib/magic_cloud/cloud.rb:41:in `draw'
	from app.rb:50:in `<main>'

I use magic_cloud like this:

cloud = MagicCloud::Cloud.new(words)
img = cloud.draw(400, 300)
img.write('words.png')

I use the version directly from github. It works from the command line with a text file like in the descriptrion.

Flipez avatar Feb 03 '18 12:02 Flipez

What was in your text, had it this mentioned thing (%m) by chance? get_type_metrics is pretty weird.

zverok avatar Feb 16 '18 09:02 zverok