Class FontUnit

Class FontUnit

名称: Aspose.BarCode.Generation 聚集: Aspose.BarCode.dll (25.4.0)

定义文本的特定格式,包括字体面部、尺寸和风格属性在某个单位价值的财产。

public sealed class FontUnit

Inheritance

object FontUnit

继承人

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

此样本显示如何创建和保存 BarCode 图像。

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

收到或设置这个字体的面部名称。

[XmlSerialization(Type = XmlSerializationType.Element)]
public string FamilyName { get; set; }

财产价值

string

Size

在单位值中获取或设置此 FontUnit 的尺寸。

[XmlSerialization(Type = XmlSerializationType.Element, Name = "Size")]
public Unit Size { get; }

财产价值

Unit

Exceptions

ArgumentException

参数值低于或等于0。

Style

获取或为此 FontUnit 设置风格信息。

[XmlSerialization(Type = XmlSerializationType.Element)]
public FontStyle Style { get; set; }

财产价值

FontStyle

 中文