ITextStyle
Text formatting used by document text runs and rich-text cells. It shares basic font and decoration fields with cell styles.
Import
import type { ITextStyle } from '@univerjs/core'Definition
interface ITextStyle extends IStyleBase { hidden?: boolean fontHint?: 'default' | 'eastAsia' | 'cs' positionedTab?: { alignment: TabStopAlignment relativeTo: 'margin' | 'indent' leader?: TabStopLeader } symbol?: { font: string code: number } lang?: string altLang?: string kerning?: number caps?: boolean smallCaps?: boolean sc?: number pos?: number sa?: number textFill?: IDocTextFill textOutline?: IDocTextOutline glow?: IGlowEffect outerShadow?: IShadowEffect}Fields
hidden
Optional · boolean | undefined
Retain text in the document without painting it or reserving layout space (OOXML vanish). Absent inherits.
fontHint
Optional · "cs" | "default" | "eastAsia" | undefined
Word font-type hint for characters shared by Latin, East Asian and complex scripts.
positionedTab
Optional · { alignment: TabStopAlignment; relativeTo: "indent" | "margin"; leader?: TabStopLeader | undefined; } | undefined
Alignment tab anchored to the page margins or paragraph indents. Applies only to a tab character.
symbol
Optional · { font: string; code: number; } | undefined
Original font-specific OOXML symbol; only applies to the matching character.
lang
Optional · string | undefined
Authored text language (BCP 47), used by language-sensitive text layout. Absent inherits.
altLang
Optional · string | undefined
Alternate language from the authored text properties (BCP 47). Absent inherits.
kerning
Optional · number | undefined
Minimum font size for pair kerning, in the same units as fs. Zero disables it; absent inherits.
caps
Optional · boolean | undefined
Display capital letters without changing the source text. Absent inherits.
smallCaps
Optional · boolean | undefined
Display lowercase letters as smaller capitals without changing source text. Absent inherits.
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
Package: @univerjs/core · Type definitions
How is this guide?