Skip to content

API reference / Common / Engine types / TextCharacterProperty

Type Alias: TextCharacterProperty ​

ts
type TextCharacterProperty = 
  | {
  bold: boolean;
}
  | {
  boldComplex: boolean;
}
  | {
  italic: boolean;
}
  | {
  italicComplex: boolean;
}
  | {
  size: number;
}
  | {
  sizeComplex: number;
}
  | {
  fontLatin: TextFont;
}
  | {
  fontEastAsian: TextFont;
}
  | {
  fontComplex: TextFont;
}
  | {
  fontSymbol: TextFont;
}
  | {
  letterSpacing: number;
}
  | {
  kerning: number;
}
  | {
  ligatures: TextLigatures;
}
  | {
  widthScale: number;
}
  | {
  fitTextWidth: number;
}
  | {
  normalizeHeight: boolean;
}
  | {
  fill: PaintFill;
}
  | {
  highlight: PaintColor;
}
  | {
  shading: PaintFill;
}
  | {
  underline: TextUnderline;
}
  | {
  strike: boolean;
}
  | {
  doubleStrike: boolean;
}
  | {
  outline: PaintLine;
}
  | {
  shadow: boolean;
}
  | {
  condense: boolean;
}
  | {
  extend: boolean;
}
  | {
  effects: PaintEffectList;
}
  | {
  caps: boolean;
}
  | {
  smallCaps: boolean;
}
  | {
  emphasis: TextEmphasisMark;
}
  | {
  baselineAlign: TextBaselineAlign;
}
  | {
  baselineOffset: number;
}
  | {
  styleRef: TextCharacterStyleId;
}
  | {
  eastAsianLayout: TextEastAsianLayout;
}
  | {
  language: TextLanguage;
}
  | {
  rtl: boolean;
}
  | {
  noProof: boolean;
}
  | {
  hidden: boolean;
}
  | {
  border: PaintBorder;
}
  | {
  hyperlink: TextHyperlink;
};

One specified character property — a [TextCharacterPropertyKey] carrying its value. The value-bearing twin of the key: set takes one, iter yields them, and the Loro mark builder maps each to a (key, value). The large structured values (the fill group, underline, outline, effects, and the docx boxes) are boxed to keep the enum — and every enum that carries it — small.