---
title: "FontSizeScope"
description: "An interface that introduces the fontSize property to a Style receiver scope."
type: "interface"
lastmod: "2026-05-20T01:13:53.365680Z"
---
## API Reference

> Source set: Common

```kotlin
@ExperimentalFoundationStyleApi
interface FontSizeScope
```

An interface that introduces the [fontSize](#fontsize) property to a [Style](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/Style) receiver scope.

## Functions

### fontSize

```kotlin
fun fontSize(value: TextUnit)
```

Sets the font size for the text. This property is inherited by child text components if not
overridden. This affects text layout and rendering, and is a component of a [TextStyle](/jetpack-compose/androidx.compose.ui/ui-text/classes/TextStyle).

This property is inherited.

#### Parameters

| | |
| --- | --- |
| value | The font size in [TextUnit](/jetpack-compose/androidx.compose.ui/ui-unit/classes/TextUnit) (e.g., `16.sp`). |
