Class Font

Class Font

名称: Aspose.Imaging 收藏: Aspose.Imaging.dll (25.4.0)

定义文本的特定格式,包括字体面、尺寸和风格属性。

[JsonObject(MemberSerialization.OptIn)]
public sealed class Font

Inheritance

object Font

继承人

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

Constructors

Font(字体,字体风格)

启动一个新的 Aspose.Imaging.Font 使用所指定的现有 Aspose.Imaging.Font 和 Aspose.Imaging.FontStyle 列表。

public Font(Font prototype, FontStyle newStyle)

Parameters

prototype Font

现有 Aspose.Imaging.Font 从哪里创建新的 Aspose.Imaging.Font。

newStyle FontStyle

Aspose.Imaging.FontStyle 适用于新 Aspose.Imaging.Font. 多值的 Aspose.Imaging.FontStyle 列表可以与 OR 运营商相结合。

Exceptions

ArgumentNullException

prototype’ is null.

Font(字符, float)

创建一个新的 Aspose.Imaging.Font 使用指定的尺寸. 字符集设置为 Aspose.Imaging.CharacterSet.Default,图形单元为 Aspose.Imaging.GraphicsUnit.Point,字体风格为 Aspose.Imaging.FontStyle.Regular。

public Font(string fontName, float emSize)

Parameters

fontName string

字符串代表 Aspose.Imaging.Font 名称。

emSize float

字体的 em 尺寸,在点,新字体。

Exceptions

ArgumentOutOfRangeException

emSize’ is less than or equal to 0, evaluates to infinity or is not a valid number.

ArgumentNullException

fontName’ is null.

Font(字符串、字符串、字符串)

启动一个新的 Aspose.Imaging.Font 使用指定的尺寸和风格. 字符集设置为 Aspose.Imaging.CharacterSet.Default,图形单元为 Aspose.Imaging.GraphicsUnit.Point。

public Font(string fontName, float emSize, FontStyle style)

Parameters

fontName string

字符串代表 Aspose.Imaging.Font 名称。

emSize float

字体的 em 尺寸,在点,新字体。

style FontStyle

新字体的 Aspose.Imaging.FontStyle。

Exceptions

ArgumentOutOfRangeException

emSize’ is less than or equal to 0, evaluates to infinity or is not a valid number.

ArgumentNullException

fontName’ is null.

Font(字符串, Float, GraphicsUnit)

启动一个新的 Aspose.Imaging.Font 使用指定的尺寸和单位. 字符集设置为 Aspose.Imaging.CharacterSet.Default,风格设置为 Aspose.Imaging.FontStyle.Regular。

public Font(string fontName, float emSize, GraphicsUnit unit)

Parameters

fontName string

字符串代表 Aspose.Imaging.Font 名称。

emSize float

新字体的 em 尺寸在 unit’ 参数所指的单元中。

unit GraphicsUnit

The Aspose.Imaging.Graphics新字体的一部分。

Exceptions

ArgumentOutOfRangeException

emSize’ is less than or equal to 0, evaluates to infinity or is not a valid number.

ArgumentNullException

fontName’ is null.

Font(字符串, Float, FontStyle, GraphicsUnit, CharacterSet)

启动一个新的 Aspose.Imaging.Font 使用指定的尺寸、风格、单位和字符集。

public Font(string fontName, float emSize, FontStyle style, GraphicsUnit unit, CharacterSet characterSet)

Parameters

fontName string

字符串代表 Aspose.Imaging.Font 名称。

emSize float

新字体的 em 尺寸在 unit’ 参数所指的单元中。

style FontStyle

新字体的 Aspose.Imaging.FontStyle。

unit GraphicsUnit

The Aspose.Imaging.Graphics新字体的一部分。

characterSet CharacterSet

一个字符设置用于这个字体。

Exceptions

ArgumentOutOfRangeException

emSize’ is less than or equal to 0, evaluates to infinity or is not a valid number.

ArgumentNullException

fontName’ is null.

Font(字符串, Float, FontStyle, GraphicsUnit)

启动一个新的 Aspose.Imaging.Font 使用指定的尺寸、风格和单位。

public Font(string fontName, float emSize, FontStyle style, GraphicsUnit unit)

Parameters

fontName string

字符串代表 Aspose.Imaging.Font 名称。

emSize float

新字体的 em 尺寸在 unit’ 参数所指的单元中。

style FontStyle

新字体的 Aspose.Imaging.FontStyle。

unit GraphicsUnit

The Aspose.Imaging.Graphics新字体的一部分。

Exceptions

ArgumentOutOfRangeException

emSize’ is less than or equal to 0, evaluates to infinity or is not a valid number.

ArgumentNullException

fontName’ is null.

Properties

Bold

得到一个值,表明这个 Aspose.Imaging.Font 是否有勇气。

public bool Bold { get; }

财产价值

bool

CharacterSet

收到一个比特值,指定这个 Aspose.Imaging.Font 使用的字符设置。

public CharacterSet CharacterSet { get; }

财产价值

CharacterSet

Italic

得到一个值,表明这个 Aspose.Imaging.Font 是否是意大利语。

public bool Italic { get; }

财产价值

bool

Name

得到这个 Aspose.Imaging.Font 的面部名称。

public string Name { get; }

财产价值

string

Size

得到这个 Aspose.Imaging.Font 的 em 尺寸在 Aspose.Imaging.Font 属性所指定的单位中测量。

public float Size { get; }

财产价值

float

Strikeout

收到一个值,表明这个 Aspose.Imaging.Font 是否通过字体指定一个水平线。

public bool Strikeout { get; }

财产价值

bool

Style

获取此 Aspose.Imaging.Font 的风格信息。

public FontStyle Style { get; }

财产价值

FontStyle

Underline

得到一个值,表明这个 Aspose.Imaging.Font 是否被突出。

public bool Underline { get; }

财产价值

bool

Unit

得到这个 Aspose.Imaging.Font 的测量单位。

public GraphicsUnit Unit { get; }

财产价值

GraphicsUnit

Methods

DeepClone()

创建这个 Aspose.Imaging.Font 的准确深副本。

public Font DeepClone()

Returns

Font

Aspose.Imaging.Font 这个方法创造了。

Equals(对象)

指示所指定的对象是否是一个 Aspose.Imaging.Font 并且具有与此 Aspose.Imaging.Font 相同的属性值。

public override bool Equals(object obj)

Parameters

obj object

要测试的对象。

Returns

bool

是的,如果 obj’ 参数是 Aspose.Imaging.Font 并且具有与此 Aspose.Imaging.Font 相同的属性值;否则,虚假。

GetHashCode()

获取此 Aspose.Imaging.Font 的哈希代码。

public override int GetHashCode()

Returns

int

此分類上一篇: Aspose.Imaging.Font

ToString()

返回这个 Aspose.Imaging.Font 的人类可读的序列代表性。

public override string ToString()

Returns

string

这个字符串代表这个 Aspose.Imaging.Font。

 中文