Open POPPIN-FUMI opened 2 years ago
I tried to use Japanese but seems like the font settings do not work.
I tried this code first
words ={"日本語"=>2, "ケール"=>2, "変更"=>2} font = "ArialUnicode" cloud.new(words, rotate: :none, scale: :linear, font_family: font) cloud.draw(500, 250).write("test.png")
but empty img was created.
Also tried with the full path of the font but still the same.
font = "/usr/share/fonts/truetype/takao-gothic/TakaoPGothic.ttf" cloud = MagicCloud::Cloud.new(words, rotate: :none, scale: :linear, font:)
I tried rmagick directly and it worked.
rmagick
convert -font /usr/share/fonts/truetype/takao-gothic/TakaoPGothic.ttf -pointsize 18 -fill black -draw "text 50,50 '表示される'" test.png out.png
Does anyone know how to output Japanese in the image?
I tried to use Japanese but seems like the font settings do not work.
I tried this code first
but empty img was created.
Also tried with the full path of the font but still the same.
I tried
rmagick
directly and it worked.Does anyone know how to output Japanese in the image?