Class FontUnit
Class FontUnit
Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.2.0)
Defines a particular format for text, including font face, size, and style attributes where size in Unit value property.
public sealed class FontUnit
Inheritance
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
This sample shows how to create and save a BarCode image.
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128))
{
generator.CodeTextStyle.Font.Style = FontStyle.Italic;
generator.CodeTextStyle.Font.Size.Point = 18;
generator.Save("test.png");
}
Properties
FamilyName
Gets or sets the face name of this Font.
[XmlSerialization(Type = XmlSerializationType.Element)]
public string FamilyName { get; set; }
Property Value
Size
Gets or sets size of this FontUnit in Unit value.
[XmlSerialization(Type = XmlSerializationType.Element, Name = "Size")]
public Unit Size { get; }
Property Value
Exceptions
The Size parameter value is less than or equal to 0.
Style
Gets or sets style information for this FontUnit.
[XmlSerialization(Type = XmlSerializationType.Element)]
public FontStyle Style { get; set; }
Property Value
FontStyle