Interface FontValues

interface FontValues {
    extend: boolean;
    family: string;
    familyFallbacks: string[];
    fill: AdjustedColor;
    letterSpacing: number;
    outline: boolean;
    scheme: FontScheme;
    shadow: boolean;
    size: number;
    strike: boolean;
    style: FontStyle;
    underline: boolean | UnderlineStyle;
    verticalAlign: VerticalTextAlignment;
    weight: number;
}

Properties

extend: boolean

The effect extends or stretches out the text.

Remarks

Not rendered by Excel or SheetXL.

family: string

This can be set as a string using html values such as 'Arial 11pt' but will be resolved to a single font. Fallbacks and fontSize will be marshalled into their correct property.

familyFallbacks: string[]

A list of fonts and their fallbacks. These can also be provided in the fontFamily attribute but will be normalized to here.

The text color.

Remarks

Currently only solid fill is supported but this will be expanded to allow all fill types similar to DrawML. TODO - allow this to be any fill style like DrawML

letterSpacing: number

Adds or removes additional spacing between the characters.

outline: boolean

The effect draws the text as an outline.

Remarks

Not rendered by Excel or SheetXL.

scheme: FontScheme

Defines the font scheme to use.

Default

FontScheme.Minor
shadow: boolean

The effect draws a shadow around the text.

Remarks

Not rendered by Excel or SheetXL.

size: number

Font size is either a number in points or a string that can be converted such as '14px', '1.5em'.

strike: boolean

The effect draws the text with a line through it.

style: FontStyle

Default Value

normal
underline: boolean | UnderlineStyle

Sets the underline style. If true defaults to single. If false or null defaults to none.

Default Value

UnderlineStyle.None
verticalAlign: VerticalTextAlignment

Remarks

If the VerticalTextAlign is superscript or subscript then the font size should also render smaller.

weight: number

The weight of the characters.

Remarks

700 or above is considered bold.