Share via


ITextCharacterFormat.Weight Property

Definition

Gets or sets the font weight of the characters.

public:
 property int Weight { int get(); void set(int value); };
int Weight();

void Weight(int value);
public int Weight { get; set; }
var int32 = iTextCharacterFormat.weight;
iTextCharacterFormat.weight = int32;
Public Property Weight As Integer

Property Value

Int32

int

The font weight expressed as a numeric value. See Remarks.

Remarks

In standard typography API, the weight of a font is typically expressed as a constant name, such as "Bold". Using constant names to set the Weight property is supported through type converter behaviors and by the FontWeights support class.

The FontWeights values correspond to the "usWeightClass" definition in the OpenType specification. The "usWeightClass" represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.

Applies to