当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails - rmagick don't use proper font family

问题描述:

I'm using text on image and want use other font (you can see on code)

avatar_text = Magick::Draw.new

avatar_text.annotate(avatar, 0, 0, 0, 2, @team.name.upcase) do

self.font_family = "Capitals"

self.gravity = Magick::SouthGravity

self.pointsize = 20

self.fill = "#3A3A3A"

end

But it doesn't show proper font family. I'm tried different font family but result was the same.

OS: Mac OS 10.9

Version: ImageMagick 6.8.0-10

Rails 3.2.8

I can't use path to my custom font like this (it's works but doesn't on my hosting)

avatar_text.font = "#{Rails.root}/lib/fonts/HighSchoolUSASerif.ttf"

Thanks.

分享给朋友:
您可能感兴趣的文章:
随机阅读: