[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphicsmagick-help
Subject:    Re: [GM-help] Draw text with the specified font
From:       Bob Friesenhahn <bfriesen () simple ! dallas ! tx ! us>
Date:       2012-05-16 14:38:39
Message-ID: alpine.GSO.2.01.1205160931310.22705 () freddy ! simplesystems ! org
[Download RAW message or body]

On Sun, 13 May 2012, Roman Suvorov wrote:

> Hi!
> 
> I have an JPG image to draw some text on it and I try to do it with the code as follows
> 
> image.font("FreeMono");
> image.draw(text);
> 
> ... but text is drawn with the same font despite the font name specified.
> What do I do wrong?

GraphicsMagick is rather primitive when it comes to fonts. It should 
be supporting fontlib, but is not doing so yet.  As a result, a bare 
font name needs to be supported by a font definition from type.mgk (or 
included by it) or the font name needs to be the path to a font file 
supported by FreeType (e.g. "myfont.ttf").

You can see the font names that GraphicsMagick knows about (from 
type.mgk) via

   gm convert -list type

You can create your own type.mgk file which includes the definitions 
you need.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic