How to write text with angle orientation in ImageMagick?

☆樱花仙子☆ 提交于 2019-12-04 15:18:29
emcconville

You'll need to copy your TTF font file into a path your ImageMagick install is looking for fonts. For me, that's /usr/X11/share/fonts/TTF/.

sudo cp -p geoslab703-xbd-bt-extra-bold.ttf \
           /usr/X11/share/fonts/TTF/geoslab703-xbd-bt-extra-bold.ttf

You can verify that the font is available to you by running the identify utility.

identify -list font

And simply search for your font

  Font: GeoSlab703-XBd-BT-Extra-Bold
    family: GeoSlab703 XBd BT
    style: Normal
    stretch: Normal
    weight: 400
    glyphs: /usr/X11/share/fonts/TTF/geoslab703-xbd-bt-extra-bold.ttf

For displaying at an angle

I would suggest doing all your text handling within a single -draw command

convert -size 600x357 xc:none -draw "image Over 0,0 0,0 'background01.jpg'" \
  -draw "font GeoSlab703-XBd-BT-Extra-Bold font-size 30 fill white \
         rotate -15 text 140,165 'mijn ideale'" \
  -append +repage result.jpg

More examples @ Text Handling Usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!