Languages and right-to-left text
Which languages Pixmato templates can show, how fonts are chosen for each one, and how to set right-to-left text in the editor and the API.
Send text to a template in the language it is written in. Pixmato picks a font that has the letters, so you do not need a separate template for each language.
Supported languages
Pixmato looks at the text in each text layer. When it finds letters from one of the writing systems below, it uses the matching Noto font for those letters. The rest of the layer keeps the font you chose, so numbers and Latin letters still match your design.
| Writing system | Languages | Font used |
|---|---|---|
| Latin | English, Spanish, French, German, Vietnamese | The layer’s own font |
| Devanagari | Hindi, Marathi, Nepali | Noto Sans Devanagari |
| Arabic | Arabic, Persian, Urdu | Noto Sans Arabic |
| Hebrew | Hebrew | Noto Sans Hebrew |
| Chinese | Simplified Chinese | Noto Sans SC |
| Chinese | Traditional Chinese | Noto Sans TC, when you choose it |
| Japanese | Japanese | Noto Sans JP |
| Korean | Korean | Noto Sans KR |
| Thai | Thai | Noto Sans Thai |
This happens in the editor, in previews and in generated images. There is nothing to switch on.
Russian and Greek work when the font on the layer includes Cyrillic or Greek letters.
Other writing systems, such as Bengali, Tamil, Telugu, Gujarati and Amharic, do not have a matching font yet. Text in those may show as empty boxes.
Send text in another language
Nothing changes in the request. Each field takes the text as you have it.
{
"template": "YOUR_TEMPLATE_ID",
"modifications": {
"saving": "30% की छूट",
"product_name": "कास्ट आयरन कैसरोल",
"price": "₹6,900"
}
}
Pixmato shows the text exactly as you send it. It does not translate text or reformat prices and dates.
Traditional Chinese
Chinese text uses the Simplified Chinese font unless you say otherwise, because the two share most of their characters. For Traditional Chinese, choose Noto Sans TC as the layer’s font in the editor, or send it with the request:
{
"product_name": "手工粗陶茶杯",
"product_name.font_family": "Noto Sans TC"
}
Text that contains Japanese kana uses the Japanese font, and text that contains Korean letters uses the Korean font, including for any Chinese characters in the same layer.
Right-to-left text
Arabic and Hebrew are read from right to left. The letters come out in the right order on their own. The direction setting tells the layer which side a line starts from, and where numbers and punctuation sit in a line that mixes both directions.
In the editor
Select the text layer and set Direction to Right to left. A layer that was aligned to the left moves to the right. Centered and justified text keeps its alignment.
Use this for a template that is always in Arabic or Hebrew.
In a request
Add .direction after the field key. Use this when one template makes images in several languages.
{
"saving": "خصم 25%",
"saving.direction": "rtl",
"product_name": "سماعات رأس لاسلكية",
"product_name.direction": "rtl"
}
| Property | Values | What it does |
|---|---|---|
.direction |
ltr, rtl |
Sets the reading direction of a text field. |
.text_align or .textAlign |
left, center, right, justify |
Sets the alignment of a text field. |
Sending rtl for a field that is aligned to the left also aligns it to the right. Sending ltr for a right-to-left field that is aligned to the right aligns it to the left. To choose the alignment yourself, send .text_align in the same request:
{
"price": "749 ر.س",
"price.direction": "rtl",
"price.text_align": "left"
}
Set the direction on each text field that needs it. There is no setting for the whole template.
Long words
Text layers have a Long words setting with two choices.
| Choice | What happens |
|---|---|
| Split | A word wider than the box is split across two lines. |
| Keep whole | With the Shrink fit, the text gets smaller until the word fits on one line. Korean text breaks only at spaces. |
With Keep whole, a word is still split if it does not fit at the layer’s minimum size.
New text layers start on Keep whole. Layers in templates you already have, and in templates copied from the gallery, stay on Split so that images you already make do not change. To switch a layer, select it in the editor and choose Keep whole.
In template JSON the setting is "lineBreaking": "words" on a text layer. Leave the field out for Split. It cannot be set in a render request.
Things to check
- Letter spacing with Arabic. Arabic letters join up. Extra space between letters pulls them apart, so set letter spacing to
0on layers that show Arabic. - Chinese and Japanese line ends. These languages have no spaces between words, so a line can end after any character. Text that is cut off with “…” can stop in the middle of a phrase.
- The style of the Noto font. The Noto fonts are plain. Next to a decorative headline font they look different from the Latin text. Choose a font for the layer yourself if that matters.
- Your longest text. Click Preview data in the editor and paste the longest value you have in each language. See Keep long text inside its box.