はじめに
fontWeight
は結構使いますが、fontWidth
は全然使いません。
使わないのでどんな機能なのかわからなかったのでちょびっと調べてみました。
実装
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 10) {
Text("fontWidth")
.fontWidth(.compressed)
Text("fontWidth")
.fontWidth(.condensed)
Text("fontWidth")
.fontWidth(.expanded)
Text("fontWidth")
.fontWidth(.standard)
}
}
}
こうなる
全角だとどうなるか
おわり
全角だと変わらないのには注意が必要そうですね