# ITextStyle

- Human documentation: [https://docs.univer.ai/reference/types/text-style](https://docs.univer.ai/reference/types/text-style)

- Agent Markdown: [https://docs.univer.ai/reference/types/text-style.md](https://docs.univer.ai/reference/types/text-style.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [types/text-style.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/types/text-style.mdx)

---

Text formatting used by document text runs and rich-text cells. It shares basic font and decoration fields with cell styles.

## Import

```ts
import type { ITextStyle } from '@univerjs/core'
```

## Definition

```ts
interface ITextStyle extends IStyleBase {
  sc?: number
  pos?: number
  sa?: number
  textFill?: IDocTextFill
  textOutline?: IDocTextOutline

  glow?: IGlowEffect

  outerShadow?: IShadowEffect
}
```

## Fields

### `sc`

Optional · `number | undefined`

### `pos`

Optional · `number | undefined`

### `sa`

Optional · `number | undefined`

### `textFill`

Optional · `IDocTextFill | undefined`

### `textOutline`

Optional · `IDocTextOutline | undefined`

### `glow`

Optional · `IGlowEffect | undefined`

DrawingML-style glow around the rendered glyphs.

This is primarily intended for embedded rich text such as Shape text. A standalone document product may
preserve and render the value without exposing dedicated authoring controls.

### `outerShadow`

Optional · `IShadowEffect | undefined`

DrawingML-style outer shadow around the rendered glyphs.

This is primarily intended for embedded rich text such as Shape text. A standalone document product may
preserve and render the value without exposing dedicated authoring controls.

### `ff`

Optional · `Nullable<string>`

fontFamily

### `eastAsiaFontFamily`

Optional · `Nullable<string>`

Font family used for East Asian characters in rich text.

### `fs`

Optional · `number | undefined`

Font size in points (pt), where 1 pt is 1/72 inch.

### `it`

Optional · `BooleanNumber | undefined`

italic
0: false
1: true

### `bl`

Optional · `BooleanNumber | undefined`

bold
0: false
1: true

### `ul`

Optional · `ITextDecoration | undefined`

underline

### `bbl`

Optional · `ITextDecoration | undefined`

bottomBorerLine

### `st`

Optional · `ITextDecoration | undefined`

strikethrough

### `ol`

Optional · `ITextDecoration | undefined`

overline

### `bg`

Optional · `Nullable<IColorStyle>`

background

### `bd`

Optional · `Nullable<IBorderData>`

border

### `cl`

Optional · `Nullable<IColorStyle>`

foreground

### `va`

Optional · `Nullable<BaselineOffset>`

(Subscript 下标 /Superscript上标 Text)

### `n`

Optional · `Nullable<{ pattern: string; }>`

Numfmt pattern

## Related types

* [`IStyleBase`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)
* [`IDocTextFill`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-document-data.d.ts)
* [`IDocTextOutline`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-document-data.d.ts)
* [`IGlowEffect`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)
* [`IShadowEffect`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-style-data.d.ts)

**Package:** [`@univerjs/core`](https://docs.univer.ai/reference/packages/plugins/univerjs/core.md) · [Type definitions](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-document-data.d.ts)
