@samatawy/diagrams
    Preparing search index...

    Interface TextStyle

    TextStyle defines the properties of text that can be rendered on nodes in the diagram, including font, size, alignment, and color.

    interface TextStyle {
        fontFace?: string;
        size?: number;
        color?: string;
        halo?: string;
        align?: ITextAlign;
        baseline?: ITextBaseline;
        orientation?: ITextOrientation;
        weight?: IFontWeight;
        italic?: boolean;
    }
    Index

    Properties

    fontFace?: string

    The font face of the text, which can be a CSS font-family string (e.g., 'Arial', 'Helvetica', 'Times New Roman') or undefined for a default font. If the font face is undefined, the rendering logic may choose a default font based on the node's properties or theme.

    size?: number

    The font size of the text, which can be a number representing the size in pixels or undefined for a default size. If the font size is undefined, the rendering logic may choose a default size based on the node's properties or theme.

    color?: string

    The color of the text, which can be a CSS color string (e.g., '#000000' for black) or undefined for a default color. If the color is undefined, the rendering logic may choose a default text color based on the node's properties or theme.

    halo?: string

    The color of a halo rendered around text to improve its visibility against complex backgrounds, which can be a CSS color string (e.g., '#ffffff' for white) or undefined for no halo. Use 'inherit' to use the same color as the node's fillstyle or diagram background.

    align?: ITextAlign

    The alignment of the text relative to its anchor point, which can be 'left', 'center', or 'right'.

    baseline?: ITextBaseline

    The baseline of the text relative to its anchor point, which can be 'top', 'middle', or 'bottom'.

    orientation?: ITextOrientation

    The orientation of the text, which can be 'horizontal' for normal left-to-right text or 'vertical' for text that is rotated 90 degrees clockwise.

    weight?: IFontWeight
    italic?: boolean

    Whether the text is italicized, which can be true for italic text, false for normal style, or undefined for a default style.