Skip to content
Pixmato
Esc
↑↓navigate↵open⌘Jpreview
On this page

Keep Long Text Inside Its Box

Use the Fit setting in the Pixmato editor so long names and headlines shrink, cut off cleanly or grow, without breaking the layout.

A design that looks right with “Harlow Satchel” can break with “Harlow Leather Satchel in Chestnut”. The Fit setting decides what a text layer does when the text is too long for its box. This tutorial explains the four choices and when to use each.

It uses the Product sale template from Make your first image.

Step 1: Select the text layer

Open the template in the editor and click the text you want to control. Here it is the product name.

The blue outline is the layer’s box. Text is kept inside this box, so make the box as large as the design allows before you choose a fit.

Step 2: Choose a fit

In the right-hand panel, under Typography, open the Fit menu.

The Fit menu open in the Typography section, listing Fixed, Shrink, Clamp and Grow

Fit What happens to long text Use it for
Fixed Nothing. The text keeps its size and can run past the box. Text that never changes, such as your shop name.
Shrink The text gets smaller until it fits the box. Names, headlines and prices that must be shown in full.
Clamp The text is cut off at the end of a word after a set number of lines, and ends with “…”. Descriptions and article titles, where a tidy layout matters more than every word.
Grow The box gets taller to hold the text. Text with room below it, such as a paragraph at the bottom of a design.

Step 3: Set the limit

Each fit has one extra setting beside the menu.

  • Shrink has a Minimum size. The text never gets smaller than this, so it stays readable. In this template the product name starts at 92 and can shrink to 44.
  • Clamp has Max lines. Two or three lines suit most titles.
  • Grow has no limit. If another layer sits below the text, select that layer and set Place below to the text layer. It then moves down as the text grows.

Step 4: Check it with a long value

Click Preview data and type the longest value you expect into the box.

The preview with a four-word product name, which has shrunk to fit beside the photo

Here the product name has gone from two lines to four and the text has shrunk to fit, while the price below it has stayed where it was.

Try the shortest value too. A one-word name should not leave an awkward gap.

Things to know

  • One very long word can split. With Long words set to Split, a single word wider than the box breaks across two lines. Set it to Keep whole and Shrink makes the text smaller until the word fits. New text layers already use Keep whole; older layers and gallery templates use Split.
  • Shrink has a floor. Text longer than the box can hold at the minimum size will still run over. Lower the minimum size, or use Clamp.
  • The preview is a guide. Click Test template and make a real image to confirm the final result.

Next step

Your template now handles real data. To fill it in from a spreadsheet without code, follow Google Sheets rows to product images. To use it from your own code, start with the quickstart.

Was this page helpful?