Class FontUnit
Class FontUnit
Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.1.0)
Định nghĩa một định dạng cụ thể cho văn bản, bao gồm kiểu chữ, kích thước và thuộc tính kiểu dáng, trong đó kích thước trong thuộc tính giá trị Đơn vị.
public sealed class FontUnit
Kế thừa
Các thành viên kế thừa
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Ví dụ
Mẫu này cho thấy cách tạo và lưu một hình ảnh mã vạch.
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128))
{
generator.CodeTextStyle.Font.Style = FontStyle.Italic;
generator.CodeTextStyle.Font.Size.Point = 18;
generator.Save("test.png");
}
Thuộc tính
FamilyName
Lấy hoặc thiết lập tên kiểu chữ của Font này.
[XmlSerialization(Type = XmlSerializationType.Element)]
public string FamilyName { get; set; }
Giá trị thuộc tính
Size
Lấy hoặc thiết lập kích thước của FontUnit này trong giá trị Đơn vị.
[XmlSerialization(Type = XmlSerializationType.Element, Name = "Size")]
public Unit Size { get; }
Giá trị thuộc tính
Ngoại lệ
Giá trị tham số Size nhỏ hơn hoặc bằng 0.
Style
Lấy hoặc thiết lập thông tin kiểu dáng cho FontUnit này.
[XmlSerialization(Type = XmlSerializationType.Element)]
public FontStyle Style { get; set; }
Giá trị thuộc tính
FontStyle