Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text string contains image attribute reference `%m #13

Open
Flipez opened this issue Feb 3, 2018 · 1 comment
Open

text string contains image attribute reference `%m #13

Flipez opened this issue Feb 3, 2018 · 1 comment

Comments

@Flipez
Copy link

Flipez commented Feb 3, 2018

/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.

@zverok
Copy link
Owner

zverok commented Feb 16, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants