Custom font size for Text in SwiftUI

Solution 1:

You can set an explicit size for the system font with:

.font(.system(size: 60))

Solution 2:

You can set custom font size like this,

.font(.custom("FONT_NAME", size: 20))

Solution 3:

Text("Default font design").font(Font.system(size:30, design: .default))
Text("Monospaced font design").font(Font.system(size:30, design: .monospaced))
Text("Rounded font design").font(Font.system(size:30, design: .rounded))
Text("Serif font design").font(Font.system(size:30, design: .serif))

Text("Large Title").font(.largeTitle)
Text("Title").font(.title)
Text("Headline").font(.headline)
Text("SubHeadline").font(.subheadline)
Text("Body").font(.body)
Text("Callout").font(.callout)
Text("Caption").font(.caption)
Text("FootNote").font(.footnote)

Text("Custom font").font(Font.custom("OpenSans-Bold", size: 12.3))

more detail Please follow: https://github.com/arjun011/SwiftUI-Controls