Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Drawing Italic / Different font text

$
0
0
This doesn't seem to work to draw italic, bold Tahoma text:
using (var img = new MagickImage(img.Filename))
{
    // Draw text
    working.StrokeColor = new MagickColor("#FFFFFF");
    working.FillColor = working.StrokeColor;
    working.Font = "Tahoma";
    working.FontPointsize = 24f;

    using (var piFont = new DrawableFont("Tahoma", FontStyleType.Italic, FontWeight.Weight700, FontStretch.Normal))
    {
        working.Draw(piFont);               
        var metrics = working.FontTypeMetrics("Why hello there!");
        using (var piText = new DrawableText(10, working.Height - metrics.TextHeight - 10, "Why hello there!"))
        {
            working.Draw(piText);
        }
    }

}
Any suggestions?

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>