---
schema_version: "1"
id: 98933cc9fa3c650845da9ea3454bbfd24703e49f78426037b8fa9c7fe91afdd8
title: AgentforceTypography
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/android/agentforce-typography-android.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-typography-android.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f53132d904e8818048d99de211851d08f1473fa6bfda0baa5aa79dd2ce3bcd2f
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceTypography

`object AgentforceTypography : Typography`

The Agentforce type scale: a set of 23 text styles covering every text element the SDK draws, extending the Salesforce SharedUI `Typography` base class. `AgentforceTypography.Default` is the ready-made instance — start from it rather than constructing your own.

Declared in package `com.salesforce.android.agentforcesdk.components.theme`.

## Properties

| Property                    | Type        | Description                                         |
| --------------------------- | ----------- | --------------------------------------------------- |
| `bodyFontScale1Regular`     | `TextStyle` | Body text style at scale 1, regular weight          |
| `bodyFontScale1Semibold`    | `TextStyle` | Body text style at scale 1, semibold weight         |
| `bodyFontScale2Regular`     | `TextStyle` | Body text style at scale 2, regular weight          |
| `bodyFontScale2Semibold`    | `TextStyle` | Body text style at scale 2, semibold weight         |
| `bodyFontScaleBaseRegular`  | `TextStyle` | Base body text style, regular weight                |
| `bodyFontScaleBaseSemibold` | `TextStyle` | Base body text style, semibold weight               |
| `bodyFontScaleNeg1Regular`  | `TextStyle` | Body text style at negative scale 1, regular weight |
| `titlesFontScale3Regular`   | `TextStyle` | Title text style at scale 3, regular weight         |
| `titlesFontScale3Semibold`  | `TextStyle` | Title text style at scale 3, semibold weight        |
| `titlesFontScale4Regular`   | `TextStyle` | Title text style at scale 4, regular weight         |
| `titlesFontScale4Semibold`  | `TextStyle` | Title text style at scale 4, semibold weight        |
| `titlesFontScale5Regular`   | `TextStyle` | Title text style at scale 5, regular weight         |

> This table lists the styles most commonly overridden. The full type scale has 23 styles — see the SDK source or ask the Android team for the complete list before publishing.

## Set a font family for the whole scale

`copyWithFontFamily(...)` returns a new `Typography` with every style set to the given font family, leaving weight, size, and line height untouched.

```kotlin
import androidx.compose.ui.text.font.FontFamily
import com.salesforce.android.agentforcesdk.components.theme.AgentforceTypography

val brandFont = FontFamily(/* your Font(...) resources */)
val typography = AgentforceTypography.Default.copyWithFontFamily(brandFont)
```

## Override individual styles

To change the weight, size, or line height of specific styles rather than the whole scale, derive from `AgentforceTypography.Default` and apply `mergeWith(...)`, which returns a new `Typography` with only the given styles replaced:

```kotlin
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.sp
import com.salesforce.android.agentforcesdk.components.theme.AgentforceTypography

val typography = AgentforceTypography.Default.mergeWith(
    bodyFontScale1Regular = TextStyle(fontSize = 16.sp, lineHeight = 22.sp),
)
```

Pass the result into `createCustomAgentforceThemeManager(typography = typography)`, or set it on `AgentforceThemeOverrides` if you're overriding through `AgentforceTheming.Overrides`.

## See also

- [AgentforceThemeManager](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-theme-manager-android.md) — exposes the active typography through `typography()`.
- [AgentforceColors](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-colors-android.md) — the matching color palette.
- [Android Theming Overview](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/theming-overview-android.md) — how typography fits into the overall theming system.
