Typeface.Weight 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
能取得字體的相對重量。
public:
property System::Windows::FontWeight Weight { System::Windows::FontWeight get(); };
public System.Windows.FontWeight Weight { get; }
member this.Weight : System.Windows.FontWeight
Public ReadOnly Property Weight As FontWeight
屬性值
一個 FontWeight 代表字體相對權重的數值。
範例
// Get the font weight value for the typeface.
FontWeight fontWeight = typeface.Weight;
if (fontWeight == FontWeights.ExtraBold)
{
// Perform action based on extra bold weight value.
}
' Get the font weight value for the typeface.
Dim fontWeight As FontWeight = typeface.Weight
If fontWeight = FontWeights.ExtraBold Then
' Perform action based on extra bold weight value.
End If
備註
粗細差異通常透過字體中某個字元筆劃或粗細的增加來區分,相較於同一字體的「正常」字元。
註 並非所有字體都有字粗。 當字體無法提供字重時,會回傳最接近的字重。