Skip to main content
A replacement is rarely the same length as the text it stands in for, and the colour a designer set is not always the colour you want to ship. Both are render-time arguments.

Fitting replacement text

fit on a single-style text layer decides what happens when the new text is wider than the layer’s area.
Paragraph, or box, layers wrap on their own and mixed-style layers keep their own layout, so fit does not apply to either. When shrink actually reduces a layer’s text, the response adds a TEXT_FIT_SHRUNK warning for that layer, so you can tell from the response alone that the text came out smaller than designed.
Smaller text leaves room in the area. vertical_align decides where it sits, and takes effect only when shrink actually reduces a single-style point-text layer: top keeps the text where the designer placed it, center puts it in the vertical middle, and bottom sits it on the bottom edge.
For user-supplied names and titles, shrink with vertical_align: "center" is the pairing that keeps a personalised run looking composed at any length.

Recolouring text

color changes the colour you actually see. Designers often give a layer its final colour through a colour effect rather than the fill, so SudoMock applies your value to whichever one defines the visible colour. The upload response tells you up front: has_color_overlay is true when the colour comes from an effect.
A layer with a gradient effect covering the text returns TEXT_COLOR_HIDDEN_BY_EFFECT, because the requested colour may not be visible in the result.

Recolouring outlines

A layer with an outline effect recolours through stroke_color. Send a hex string to recolour the front outline the layer owns, keeping its width and placement.
For stacked outlines, send a front-to-back list and recolour each one independently. null in any position keeps that outline as designed. The upload response reports stroke_count; two or more means the layer has a stack, and entries beyond that count are ignored.
has_stroke_effect true in the upload response means the layer has at least one outline of its own and supports this override. Sending stroke_color to a layer without one succeeds and returns TEXT_STROKE_NOT_PRESENT, with the value ignored. An outline owned by an enclosing group is a separate thing. Take the group UUID from the layer’s enclosing_group_layers and send it through group_layers. You can send up to 50 group overrides, and each changes the group outline around everything inside that group.

Mixed-style layers

When one layer mixes styles, a thin first name beside a bold surname, or a large price beside a small currency mark, the upload response marks it with segment_count above 1 and lists each run under segments. Personalise it by sending a segments array with only the runs you want to change, each by its index. Every segment keeps its own font, size and colour, and a run you leave out keeps its original text.
Send 1 to 32 segment entries per layer, with 1 to 200 characters each. One render carries at most 200 segment overrides across all its text layers, and one layer’s combined segment text is capped at 500 characters. Sending text to a mixed-style layer returns TEXT_SEGMENTS_REQUIRED, and sending segments to a single-style layer returns TEXT_SEGMENTS_UNSUPPORTED. Read segment_count from the upload response and branch on it once, rather than guessing per layer.

Text layers

The upload response, render overrides, and the full support matrix.

Fonts

Pick a catalogue font, or upload your own.