bold(_:)
Adds or removes bold or emphasized styling on the font.
Declaration
func bold(_ isActive: Bool) -> FontDiscussion
For fonts created from text styles, passing true could mean applying emphasized styling, which does not necessarily mean the bold weight specifically, so this modifier is not to be confused with weight(_:).
For example:
Font.body.bold(true)will most likely get you the emphasized version of body text style, which is often in semibold weight. While
Font.body.weight(.bold)will specifically get you the body text style font in the bold weight.
Using:
Font.body.bold(false)will remove any emphasized styling from the font returning to its default weight which is most likely but not guaranteed to be 0.0 or regular.