modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface FontData

    Font properties for cell text rendering.

    interface FontData {
        bold: boolean;
        charset?: number | null;
        color: string | null;
        colorSpec?: ColorData | null;
        condense?: boolean;
        explicitOff?: ("b" | "i" | "strike" | "condense" | "extend" | "u")[];
        extend?: boolean;
        family?: number | null;
        italic: boolean;
        name: string | null;
        scheme?: string | null;
        size: number | null;
        strike: boolean;
        underline: boolean;
        underlineStyle?:
            | "single"
            | "double"
            | "singleAccounting"
            | "doubleAccounting"
            | null;
        vertAlign?: "baseline"
        | "superscript"
        | "subscript"
        | null;
    }
    Index
    bold: boolean

    Whether the text is bold.

    charset?: number | null

    Character set identifier.

    color: string | null

    Font color as hex RGB (RRGGBB) or ARGB (AARRGGBB), with or without a leading #; written as uppercase ARGB (FF alpha added for RRGGBB) and read back in that form (e.g., 'FF0000' for red, read back as 'FFFF0000').

    colorSpec?: ColorData | null

    The full font colour (theme, indexed, tint or auto); see ColorData for the precedence rule against color.

    condense?: boolean

    Condense font spacing.

    explicitOff?: ("b" | "i" | "strike" | "condense" | "extend" | "u")[]

    The boolean properties written explicitly off (<b val="0"/>, <u val="none"/>, ...), so a differential format keeps its override instead of inheriting the cell's value. Filled when a dxf font is read; on write each listed property whose flag is off is written explicitly.

    extend?: boolean

    Extend font spacing.

    family?: number | null

    Font family number (1=Roman, 2=Swiss, 3=Modern, etc.).

    italic: boolean

    Whether the text is italic.

    name: string | null

    Font family name (e.g., 'Calibri', 'Arial').

    scheme?: string | null

    Font scheme (e.g., 'major', 'minor').

    size: number | null

    Font size in points.

    strike: boolean

    Whether the text has strikethrough.

    underline: boolean

    Whether the text is underlined.

    underlineStyle?:
        | "single"
        | "double"
        | "singleAccounting"
        | "doubleAccounting"
        | null

    The underline type when it is not single. Written as <u val="..."/> whenever set; with it unset, underline writes a single <u/>.

    vertAlign?: "baseline" | "superscript" | "subscript" | null

    Vertical alignment: baseline, superscript, or subscript.