Unable to get convert to use Open Sans ttf file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dodozhang21
Posts: 1
Joined: 2016-06-01T10:45:25-07:00
Authentication code: 1151

Unable to get convert to use Open Sans ttf file

Post by dodozhang21 »

Hello,

I'm trying to run the following command on our linux box
Specs:
Linux version 2.6.32-504.3.3.el6.x86_64 (mockbuild@x86-028.build.eng.bos.redhat.com)
RHEL6

Version: ImageMagick 6.7.2-7 2015-02-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Code: Select all

convert -font /usr/share/fonts/opensans/OpenSans-Regular.ttf -pointsize 72 label:Test test.gif
The resulting image simply does not use the "Open Sans" font.

We've already googled this issue for two days and did not come up with a solution. I saw a related thread here viewtopic.php?t=18324 however no solution is offered in that thread either.

Could anyone help us?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Unable to get convert to use Open Sans ttf file

Post by fmw42 »

What does

Code: Select all

convert -version 
tell you about your delegates? Does it include fontconfig and freetype?

Does it work if you quote the text?

Code: Select all

convert -font /usr/share/fonts/opensans/OpenSans-Regular.ttf -pointsize 72 label:"Test" test.gif
Is that font really in that location?

Is that a proper hyphen that matches the type of hyphen (short, regular, long) in the actual file?
Post Reply