다음을 통해 공유


TextAttribute.Weight Property

Definition

Attribute key for the weight of a font.

[Android.Runtime.Register("WEIGHT")]
public static Java.Awt.Font.TextAttribute? Weight { get; }
[<Android.Runtime.Register("WEIGHT")>]
static member Weight : Java.Awt.Font.TextAttribute

Property Value

Attributes

Remarks

Attribute key for the weight of a font. Values are instances of <b>Number</b>. The default value is WEIGHT_REGULAR.

Several constant values are provided, see #WEIGHT_EXTRA_LIGHT, #WEIGHT_LIGHT, #WEIGHT_DEMILIGHT, #WEIGHT_REGULAR, #WEIGHT_SEMIBOLD, #WEIGHT_MEDIUM, #WEIGHT_DEMIBOLD, #WEIGHT_BOLD, #WEIGHT_HEAVY, #WEIGHT_EXTRABOLD, and #WEIGHT_ULTRABOLD. The value WEIGHT_BOLD corresponds to the style value Font.BOLD as passed to the Font constructor.

The value is roughly the ratio of the stem width to that of the regular weight.

The system can interpolate the provided value.

Java documentation for java.awt.font.TextAttribute.WEIGHT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to