---
title: "font(_:)"
framework: charts
role: symbol
role_heading: Instance Method
path: "charts/axismark/font(_:)"
---

# font(_:)

Sets the default font for text in this axis content.

## Declaration

```swift
func font(_ font: Font?) -> some AxisMark

```

## Parameters

- `font`: The default font to use in this axis content.

## Mentioned in

Customizing axes in Swift Charts

## Return Value

Return Value An axis content that uses the given default font for text.
