Font.Bold Property

Gets or sets a value that indicates whether the text is bold.

Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public bool Bold { get; set; }

Property Value

true if the text is bold; otherwise, false. The default value is false.

Examples

C#
using (var bitmap = new Bitmap(300, 30, PixelFormat.Format24bppRgb, RgbColor.White))
{
    using (var graphics = bitmap.GetGraphics())
    {
        //Draw text
        var font = new Font("Futura Md BT", 20);
        font.Bold = false;
        font.Italic = true;
        font.Underline = true;
        font.Strikeout = false;
        font.HorizontalAlignment = HorizontalAlignment.Center;

        var brush = new SolidBrush(RgbColor.Red);

        graphics.DrawString("Sample text", font, brush, 150, 0);

        bitmap.Save(@"Images\Output\string.png");
    }
}

See Also

Reference