This project has moved. For the latest updates, please go here.

Setting Font Style with Captions or Lables

Jul 27, 2015 at 8:59 PM
Edited Jul 27, 2015 at 9:01 PM
I have scoured the Internet as well as the ImageMagick website and have not been able to come up with any concrete instance in which you can set the font style for a label or caption in which a custom font file is being used. The custom font file renders correctly but Is there a way you can set the font style with a Caption or Label? I am trying to achieve both bold and bold- italic.
Coordinator
Jul 28, 2015 at 9:56 PM
I spend all night figuring out how I could get this to work and I am close to a solution. I will have to make some changes for this so it won't be available until the next release. I will get back to this topic when I have more information.
Jul 29, 2015 at 9:13 PM
That would be awesome and much appreciated.
Coordinator
Jul 30, 2015 at 9:42 PM
The following will work in the next version of Magick.NET if the font supports bold/italic:
using (MagickImage img = new MagickImage())
{
    img.FontPointsize = 50;
    img.FontStyle = FontStyleType.Italic;
    img.FontWeight = FontWeight.Bold;
    img.FillColor = new MagickColor("purple");
    img.Read("label:Magick.NET");
    img.Write("test.png");
}
I will try to publish a new release this weekend.