PokéRogue
    Preparing search index...

    Interface TextStyle

    Base text style configuration.

    interface TextStyle {
        align?: "left" | "right" | "center";
        backgroundColor?: string | number | null;
        backgroundColor2?: string | number | null;
        backgroundCornerIteration?: number | null;
        backgroundCornerRadius?: number;
        backgroundHorizontalGradient?: boolean;
        backgroundStrokeColor?: string | number | null;
        backgroundStrokeLineWidth?: number;
        color?: string | number | null;
        fill?: string | number | null;
        fixedHeight?: number;
        fixedLineHeightMode?: boolean;
        fixedWidth?: number;
        fontFamily?: string;
        fontSize?: string | number;
        fontStyle?: string;
        halign?: "left" | "right" | "center";
        letterSpacing?: number;
        lineSpacing?: number;
        maxLines?: number;
        metrics?: boolean | { ascent: number; descent: number; fontSize: number };
        padding?: { bottom?: number; left?: number; right?: number; top?: number };
        resolution?: number;
        shadow?: {
            blur?: number;
            color?: string | number;
            fill?: boolean;
            offsetX?: number;
            offsetY?: number;
            stroke?: boolean;
        };
        strikethrough?: {
            color?: string
            | number;
            offset?: number;
            thickness?: number;
        };
        stroke?: string
        | number
        | null;
        strokeThickness?: number;
        testString?: string;
        underline?: {
            color?: string | number;
            offset?: number;
            thickness?: number;
        };
        valign?: "center"
        | "top"
        | "bottom";
        wordWrap?: { width?: number };
        wrap?: {
            mode?: 0 | 1 | 3 | 2 | "none" | "word" | "char" | "character" | "mix";
            width?: number | null;
        };
    }

    Hierarchy (View Summary)

    Index

    Properties

    align?: "left" | "right" | "center"

    Horizontal alignment.

    backgroundColor?: string | number | null

    Background color.

    backgroundColor2?: string | number | null

    Secondary background color.

    backgroundCornerIteration?: number | null

    Background corner iteration.

    backgroundCornerRadius?: number

    Background corner radius.

    backgroundHorizontalGradient?: boolean

    True for horizontal background gradient.

    backgroundStrokeColor?: string | number | null

    Background stroke color.

    backgroundStrokeLineWidth?: number

    Background stroke line width.

    color?: string | number | null

    Text color.

    fill?: string | number | null

    Fill color.

    fixedHeight?: number

    Fixed height.

    fixedLineHeightMode?: boolean

    True to use fixed line height mode.

    fixedWidth?: number

    Fixed width.

    fontFamily?: string

    Font family name.

    fontSize?: string | number

    Font size value.

    fontStyle?: string

    Font style string.

    halign?: "left" | "right" | "center"

    Horizontal alignment.

    letterSpacing?: number

    Letter spacing.

    lineSpacing?: number

    Line spacing.

    maxLines?: number

    Maximum lines count.

    metrics?: boolean | { ascent: number; descent: number; fontSize: number }

    Metrics configuration.

    Type Declaration

    • boolean
    • { ascent: number; descent: number; fontSize: number }
      • ascent: number

        Ascent value.

      • descent: number

        Descent value.

      • fontSize: number

        Font size value.

    padding?: { bottom?: number; left?: number; right?: number; top?: number }

    Padding configuration.

    Type Declaration

    • Optionalbottom?: number

      Bottom padding.

    • Optionalleft?: number

      Left padding.

    • Optionalright?: number

      Right padding.

    • Optionaltop?: number

      Top padding.

    resolution?: number

    Render resolution.

    shadow?: {
        blur?: number;
        color?: string | number;
        fill?: boolean;
        offsetX?: number;
        offsetY?: number;
        stroke?: boolean;
    }

    Shadow configuration.

    Type Declaration

    • Optionalblur?: number

      Shadow blur.

    • Optionalcolor?: string | number

      Shadow color.

    • Optionalfill?: boolean

      True to apply shadow to fill.

    • OptionaloffsetX?: number

      Shadow offset x.

    • OptionaloffsetY?: number

      Shadow offset y.

    • Optionalstroke?: boolean

      True to apply shadow to stroke.

    strikethrough?: { color?: string | number; offset?: number; thickness?: number }

    Strikethrough configuration.

    Type Declaration

    • Optionalcolor?: string | number

      Strikethrough color.

    • Optionaloffset?: number

      Strikethrough offset.

    • Optionalthickness?: number

      Strikethrough thickness.

    stroke?: string | number | null

    Stroke color.

    strokeThickness?: number

    Stroke thickness.

    testString?: string

    Test string for measurements.

    underline?: { color?: string | number; offset?: number; thickness?: number }

    Underline configuration.

    Type Declaration

    • Optionalcolor?: string | number

      Underline color.

    • Optionaloffset?: number

      Underline offset.

    • Optionalthickness?: number

      Underline thickness.

    valign?: "center" | "top" | "bottom"

    Vertical alignment.

    wordWrap?: { width?: number }

    Word wrap configuration.

    Type Declaration

    • Optionalwidth?: number

      Word wrap width.

    wrap?: {
        mode?: 0 | 1 | 3 | 2 | "none" | "word" | "char" | "character" | "mix";
        width?: number | null;
    }

    Wrap configuration.

    Type Declaration

    • Optionalmode?: 0 | 1 | 3 | 2 | "none" | "word" | "char" | "character" | "mix"

      Wrap mode.

    • Optionalwidth?: number | null

      Wrap width.