Contents

bold()

Applies a bold or emphasized treatment to the fonts of the text.

Declaration

nonisolated func bold() -> Text

Mentioned in

Return Value

Bold or emphasized text.

Discussion

For fonts created from text styles, it could mean applying emphasized styling, which does not necessarily mean the bold weight specifically, so this modifier is not to be confused with fontWeight(_:).

For example:

Text("hello").font(.body).bold()

will most likely get you the emphasized version of body text style, which is often in semibold weight. While

Text("hello").font(.body).fontWeight(.bold)

will specifically get you the body text style font in the bold weight.

See Also

Styling the view’s text