FontWeights 类

定义

提供一组静态预定义 FontWeight 值。Provides a set of static predefined FontWeight values.

public ref class FontWeights abstract sealed
public static class FontWeights
type FontWeights = class
Public Class FontWeights
继承
FontWeights

示例

在下面的代码示例中, FontWeight将设置为 "超粗"。In the following code example, the FontWeight is set to "UltraBold".

<TextBlock FontWeight="UltraBold" FontFamily="Gil Sans MT">Hello, world</TextBlock>

注解

字体粗细描述了字体的相对权重, 就笔划的亮度或笔画而言。A font weight describes the relative weight of a font, in terms of the lightness or heaviness of the strokes. 通常, 相对于同一字体中的 "正常" 字符, 与字体中的给定字符相关联的笔划或粗细越大, 权重差异就会有所不同。Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a font, as compared to a "normal" character from that same font.

值对应于OpenTypeOpenType规范中usWeightClass的定义。 FontWeightsThe FontWeights values correspond to the usWeightClass definition in the OpenTypeOpenType specification. usWeightClass表示1到999之间的整数值。The usWeightClass represents an integer value between 1 and 999. 值越小表示较浅权重;较高的值表示较高的权重。Lower values indicate lighter weights; higher values indicate heavier weights.

字体粗细Font weight usWeightClassusWeightClass
Thin 100100
ExtraLight

UltraLight
200200
Light 300300
Normal

Regular
400400
Medium 500500
DemiBold

SemiBold
600600
Bold 700700
ExtraBold

UltraBold
800800
Black

Heavy
900900
ExtraBlack

UltraBlack
950950

有关 OpenType "usWeightClass" 值的详细信息, 请参阅该 OpenTypeOpenType规范的 usWeightClass 部分。For more information about the OpenType 'usWeightClass' value, see the usWeightClass section of the OpenTypeOpenType specification.

属性

Black

指定“Black”字体粗细。Specifies a "Black" font weight.

Bold

指定“Bold”字体粗细。Specifies a "Bold" font weight.

DemiBold

指定“Demi-bold”字体粗细。Specifies a "Demi-bold" font weight.

ExtraBlack

指定“Extra-black”字体粗细。Specifies an "Extra-black" font weight.

ExtraBold

指定“Extra-bold”字体粗细。Specifies an "Extra-bold" font weight.

ExtraLight

指定“Extra-light”字体粗细。Specifies an "Extra-light" font weight.

Heavy

指定“Heavy”字体粗细。Specifies a "Heavy" font weight.

Light

指定“Light”字体粗细。Specifies a "Light" font weight.

Medium

指定“Medium”字体粗细。Specifies a "Medium" font weight.

Normal

指定“Normal”字体粗细。Specifies a "Normal" font weight.

Regular

指定“Regular”字体粗细。Specifies a "Regular" font weight.

SemiBold

指定“Semi-bold”字体粗细。Specifies a "Semi-bold" font weight.

Thin

指定“Thin”字体粗细。Specifies a "Thin" font weight.

UltraBlack

指定“Ultra-black”字体粗细。Specifies an "Ultra-black" font weight.

UltraBold

指定“Ultra-bold”字体粗细。Specifies an "Ultra-bold" font weight.

UltraLight

指定“Ultra-light”字体粗细。Specifies an "Ultra-light" font weight.

适用于

另请参阅