Text & Fonts
Fonts in ZPL – Resident, Downloaded and Image Text
ZPL offers three font strategies. Which one fits depends on the font, the language Unicode? and the printer model.
ZPL offers three font strategies. Which one fits depends on the font, the language (Unicode?) and the printer model.
1. Resident fonts (fast, no upload)
^XA
^FO50,50^A0N,30,30^FDHello^FS
^XZ
^A0N,30,30– font 0, normal orientation, height 30 dots, width 30 dots- Resident fonts:
0(standard A),1(bold condensed),2(bold),3(regular),4–9(OCR etc.) – depending on the printer model
Height in dots → pt: pt = dots × 72 / DPI. At 203 dpi: 30 dots ≈ 10.6 pt.
2. Downloaded fonts (memory fonts, ^A@)
Upload a TrueType font once (~DYE:ARIAL.TTF), then use it:
^XA
^A@N,40,40,E:ARIAL.TTF^FDHello^FS
^XZ
^A@o,h,w,d – orientation, height in dots, width in dots, font path on the printer.
3. Image text (TrueType rendered in the backend)
The zplCloud designer renders the text with a TrueType font in the backend and embeds it as a monochrome graphic (^GF). This guarantees identical output on every printer and supports any font and Unicode – at the cost of larger ZPL.
^XA
^FO50,50^GFA,1234,1234,77,...^FS
^XZ
Tips
- Unicode (umlauts, Cyrillic): resident fonts only cover Latin-1. Use a downloaded Unicode TTF (
E:LIBERATION_SANS.TTF) or image text. - Native mode is much faster on long print runs (no graphic transfer).
- Font size in the designer:
fontUnit: 'pt'is converted viadots = pt × DPI / 72.