func fontWeight (Font.Weight?) -> Text
Sets the font weight of the text.
テキストのフォントウェイトを設定します。
Availability 有効性
Technology
Text that uses the font you specify. あなたが指定するフォントを使うテキスト。
font
The font to use when displaying this text. このテキストを表示する時に使うフォント。
Use font(_:)
to apply a specific font to an individual Text View, or all of the text views in a container.
In the example below, the first text field has a font set directly, while the font applied to the following container applies to all of the text views inside that container:
VStack {
Text("Font applied to a text view.")
.font(.largeTitle)
VStack {
Text("These two text views have the same font")
Text("applied to their parent view.")
}
.font(.system(size: 16, weight: .light, design: .default))
}
func fontWeight (Font.Weight?) -> Text