This class accumulates font and other text rendering settings. It also provides functionality for retrieving font metrics, and other font-related information.
Namespace:
Aurigma.GraphicsMill.Drawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Class Font _
Inherits UnitConverterObject _
Implements ICloneable
public class Font : UnitConverterObject, ICloneable
All space values (like font metrics, font size, etc) are returned in units specified with Unit property.
Dim bitmap As New Aurigma.GraphicsMill.Bitmap( _
Aurigma.GraphicsMill.RgbColor.White, 300, 30, _
Aurigma.GraphicsMill.PixelFormat.Format24bppRgb)
Dim graphics As Aurigma.GraphicsMill.Drawing.GdiGraphics = bitmap.GetGdiGraphics
'Draw text
Dim font As New Aurigma.GraphicsMill.Drawing.Font("Futura Md BT", 20)
font.Bold = False
font.Italic = True
font.Underline = True
font.Strikeout = False
font.HorizontalAlignment = Aurigma.GraphicsMill.Drawing.HorizontalAlignment.Center
Dim brush As New Aurigma.GraphicsMill.Drawing.SolidBrush( _
Aurigma.GraphicsMill.RgbColor.Red)
graphics.DrawString("Sample text", font, brush, 150, 0)
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(
Aurigma.GraphicsMill.RgbColor.White, 300, 30,
Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);
Aurigma.GraphicsMill.Drawing.GdiGraphics graphics = bitmap.GetGdiGraphics();
//Draw text
Aurigma.GraphicsMill.Drawing.Font font =
new Aurigma.GraphicsMill.Drawing.Font("Futura Md BT", 20);
font.Bold = false;
font.Italic = true;
font.Underline = true;
font.Strikeout = false;
font.HorizontalAlignment = Aurigma.GraphicsMill.Drawing.HorizontalAlignment.Center;
Aurigma.GraphicsMill.Drawing.SolidBrush brush =
new Aurigma.GraphicsMill.Drawing.SolidBrush(Aurigma.GraphicsMill.RgbColor.Red);
graphics.DrawString("Sample text", font, brush, 150, 0);