@rendley/sdk - v1.16.1
    Preparing search index...

    Interface TextEditCss

    CSS declarations reproducing the clip's typography in UNSCALED text units (the units fontSize, padding, wordWrapWidth are stored in). Keys are camelCase so the object can be spread into a React style prop or Object.assigned onto an HTMLElement.style.

    textShadow and WebkitTextStroke reproduce what the renderer paints. A transparent overlay that only supplies the caret (color: transparent over the canvas glyphs) must override both to none / 0, otherwise the shadow and the stroke are painted a second time over the canvas.

    The clip scale and the canvas-to-screen ratio are deliberately NOT baked in: apply them as one CSS transform: scale() on the element that hosts the text (see TextEditOverlay.scale), so non-uniform scale and flips behave exactly like the sprite.

    interface TextEditCss {
        color: string;
        fontFamily: string;
        fontSize: string;
        fontStyle: string;
        fontWeight: string;
        letterSpacing: string;
        lineHeight: string;
        overflowWrap: "normal" | "anywhere";
        textAlign: "left" | "center" | "right";
        textShadow: string;
        WebkitTextStroke: string;
        whiteSpace: "pre" | "pre-wrap";
    }
    Index

    Properties

    color: string
    fontFamily: string
    fontSize: string
    fontStyle: string
    fontWeight: string
    letterSpacing: string
    lineHeight: string

    Always an explicit px value — the renderer's measured line height, not CSS normal.

    overflowWrap: "normal" | "anywhere"
    textAlign: "left" | "center" | "right"
    textShadow: string
    WebkitTextStroke: string
    whiteSpace: "pre" | "pre-wrap"