Font.OfSize(String, Double, FontWeight, FontSlant, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回具備所要求字型和大小的 Font 結構。
public static Microsoft.Maui.Font OfSize (string? name, double size, Microsoft.Maui.FontWeight weight = Microsoft.Maui.FontWeight.Regular, Microsoft.Maui.FontSlant fontSlant = Microsoft.Maui.FontSlant.Default, bool enableScaling = true);
static member OfSize : string * double * Microsoft.Maui.FontWeight * Microsoft.Maui.FontSlant * bool -> Microsoft.Maui.Font
Public Shared Function OfSize (name As String, size As Double, Optional weight As FontWeight = Microsoft.Maui.FontWeight.Regular, Optional fontSlant As FontSlant = Microsoft.Maui.FontSlant.Default, Optional enableScaling As Boolean = true) As Font
參數
- name
- String
目標系統字型的名稱。
- size
- Double
所需的字型大小。
- weight
- FontWeight
- fontSlant
- FontSlant
- enableScaling
- Boolean
傳回
Font 執行個體。
備註
字型可用性是平臺和裝置相依。