Fitting replacement text
fit on a single-style text layer decides what happens when the new text is
wider than the layer’s area.
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.
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.
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.
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 throughstroke_color. Send a hex
string to recolour the front outline the layer owns, keeping its width and
placement.
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 withsegment_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.
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.