ImageMagick and imagick_type_gen don't recognize added fonts

若如初见. 提交于 2019-12-06 00:51:19

A full solution is discussed here: http://www.multipole.org/discourse-server/viewtopic.php?t=25630

But here's the short version:

  1. Make a directory for your custom uploaded fonts in /usr/share/fonts/default - I created a directory called "custom".
  2. Copy the fonts you want to install to /usr/share/fonts/default/custom
  3. Run the command fc-cache -v /usr/share/fonts

After this, ImageMagick will use the fonts in the SVG. The one Caveat is that you MUST use the font-family declaration embeded in the font. For example, Lobster.otf actually lists "Lobster 1.4".

If you've got the font installed and use the proper font-family name, you'll get your fonts rendered!

You need to install the fonts on your server, that's the only way I managed to resolve this issue.

You can check Eric Green's answer on this.

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