共用方式為


Font.OfSize(String, Double, FontWeight, FontSlant, Boolean) 方法

定義

傳回具備所要求字型和大小的 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 執行個體。

備註

字型可用性是平臺和裝置相依。

適用於