Percentage rule: smaller font for long names
A long name gets one size smaller
If the name doesn't fit on its line, the template automatically switches to the smaller font.
What it's about
- A percentage rule at the start of the box content: [#:95:<fontsize=8.5>:Firstname:Lastname].
- If the fields fill more than 95% of the box, the smaller font applies.
- The rule switches exactly one step; a name that is still too long wraps, and a one-line box swallows the second line without a message.
- Test once with the longest name you can think of.
Transcript
Click a timestamp to jump to that point in the video.
- The buyer types a long name. Instead of wrapping, the name gets one size smaller – and fits on its line.
- Behind it is a percentage rule at the start of the box content. In square brackets: first the hash sign, then the threshold – ninety-five percent. Then what should happen: font size eight point five. And last, the fields that get measured: Firstname and Lastname.
- If the two fields fill more than ninety-five percent of the box, the smaller font applies. Otherwise, nothing changes.
- In the back end, open the print template in the layouter, pick the box Name under Selection, and click Inhalt bearbeiten – this button is still in German. The rule sits right at the front, before the fields.
- There's one limit: the rule switches exactly one step. It doesn't shrink smoothly. If a name is still too long at eight point five, it wraps – and in a one-line box, the second line disappears without an error message. So test once with the longest name you can think of.
- Here's how it looks live.
- Long names fit – and the buyer doesn't have to do a thing.