ZPL Fonts
See ZPL's font 0 and fonts A to H drawn on a label, read every built-in font's size in dots, and change the ^A commands to try other sizes, without the ZPL leaving your device.
How to try ZPL fonts
Look at the font sheet
The label above prints one line in each font the viewer draws, font 0 and fonts A to H, and each line names its font and the height and width in dots it is printed at: font A, for example, at 27 × 15 dots, three times its base size. It is a 4 × 6 in label at 8 dpmm (203 dpi).
Change a size
In the ZPL box, change the two numbers after a font's
^Acommand, such as^ADN,36,20. The first is the height in dots and the second the width. The label is drawn again a moment after you stop typing.Try another density
Switch Print density to 12 dpmm (300 dpi). Most fonts keep their sizes in dots, so their text takes up less of the label, as it does on a 300 dpi printer. Fonts E and H change their sizes in dots with the printhead, as in Zebra's tables.
Keep the sheet
Press Download PNG or Download PDF to keep the font sheet, or send its ZPL to your printer and compare the two.
Labels that use these fonts, with every command explained: ZPL examples.
The fonts built into Zebra printers
Zebra's ZPL II programming guide says most Zebra printers come standard with 15 bitmapped fonts and one scalable font. The spec sheet of Zebra's ZD421 desktop printer counts 16 bitmap fonts and lists them by letter: A to H, GS and P to V, beside the scalable font 0, which it names CG Triumvirate Bold Condensed. Zebra's guide says all built-in fonts are referred to by a one-character name, the letter or digit after ^A; GS, the symbol font, is used through its own command, ^GS.
A bitmapped font is drawn from a fixed grid of dots and can only be enlarged in whole steps. Font 0 is scalable: it can be any height and width. In fonts A to H every character takes the same space, so the gap between any two letters is the same; font 0 is proportional.
Each font's size in dots
These are the base sizes from Zebra's font tables for an 8 dpmm (203 dpi) printhead, as height × width in dots, with the gap between characters and the baseline, the line the letters stand on, counted down from the top of the character:
Font A: 9 × 5 dots, a 1-dot gap, baseline at 7. It is the font a printer uses for a field that names no font, until ^CF changes it.
Font B: 11 × 7 dots, a 2-dot gap, baseline at 11. Capitals only.
Fonts C and D: 18 × 10 dots each, a 2-dot gap, baseline at 14.
Font E: 28 × 15 dots, a 5-dot gap, baseline at 23, an OCR-B font. Its size in dots changes with the printhead: 21 × 10 at 6 dpmm, 42 × 20 at 12 and 24 dpmm.
Font F: 26 × 13 dots, a 3-dot gap, baseline at 21.
Font G: 60 × 40 dots, an 8-dot gap, baseline at 48, the largest of A to H.
Font H: 21 × 13 dots, a 6-dot gap, baseline at 21, an OCR-A font. At 6 dpmm it is 17 × 11, at 12 and 24 dpmm 34 × 22.
Fonts P to V: P 20 × 18, Q 28 × 24, R 35 × 31, S 40 × 35, T 48 × 42, U 59 × 53 and V 80 × 71 dots. Zebra lists them for 8, 12 and 24 dpmm printheads.
GS: 24 × 24 dots, a symbol font. The ^GS command prints the registered trademark, copyright and other symbols with it, chosen by a letter from A to E in ^FD.
Font 0: scalable, with a default size of 15 × 12 dots and its baseline at three quarters of the height.
Fonts A, C, D, F, G and P to V have capitals, lowercase letters and descenders. Apart from E and H, each font keeps its size in dots on every printhead Zebra lists it for, so its size on paper changes with the density: font A is 0.044 × 0.030 in on a 203 dpi printhead and 0.030 × 0.020 in on a 300 dpi one.
How ^A picks the font and its size
^A sets the font for the next field only. Its format is ^Afo,h,w: f is the font letter or digit, o the orientation, h the height and w the width, both in dots. ^ADN,36,20 prints font D upright, 36 dots high and 20 wide. A field with no ^A takes the default font set by ^CF.
A bitmapped font grows only in whole multiples of its base size, from 1 to 10 times, and the height and width can be multiplied separately. Zebra's own exercise uses font D: 18,10 is the smallest size it prints and 180,100 the largest, and 25,18 is not a valid size, so the printer rounds it. Zebra's page on ^A@ says such a value is rounded to the nearest whole multiple, and the viewer does the same, so ^ADN,25,18 prints 18 dots high and 20 wide.
Give only the height or only the width and the font's own proportions set the other. Font 0 takes any height and width from 10 to 32,000 dots, and Zebra notes that an equal height and width gives the most balanced letters.
Rotating text: N, R, I and B
The letter after the font sets the direction of the text: N normal, R rotated 90 degrees clockwise, I inverted 180 degrees, and B read from the bottom up, at 270 degrees. ^FW sets the direction for every field after it that gives none, until another ^FW arrives or the printer is turned off.
^CF: the default font
^CF sets the font, height and width for every field that has no ^A of its own: ^CF0,30 makes font 0 at 30 dots the default. A printer starts with font A at 9 × 5 dots. If ^CF sets only the height or only the width, the other is scaled in proportion, and a field's own ^A still applies to that one field.
Font 0, the scalable font
Font 0 can be set to any height and width, so ^A0N,50,50 gives letters 50 dots high and ^A0N,50,30 narrower ones at the same height. At 203 dpi, 50 dots is about a quarter of an inch.
Zebra's spec sheets name the typeface CG Triumvirate Bold Condensed, a licensed font that cannot be copied into a web page. The viewer draws font 0 with Archivo Bold at a condensed width, an open-licensed font chosen because its shapes matched font 0 best, and gives each character font 0's own width, so a line of text is as long as on the printer.
Downloaded TrueType fonts: ^A@ and ^CW
A printer can store more fonts. ~DY downloads a TrueType font to the printer (Zebra calls it the preferred command for TrueType fonts on firmware later than X.13), and ~DU downloads large TrueType fonts, such as Asian fonts. ^A@ then calls a font by its full name, as in ^A@N,50,50,E:ARIAL.TTF: orientation, height, width, then the drive (R:, E:, B: or A:) and the file name. ^CW gives a stored font a one-letter name, or puts it in place of a built-in one: after ^CWA,R:MYFONT.FNT, MYFONT prints wherever a label calls font A.
The viewer does not draw downloaded fonts. A file that downloads a font with ~DU or ~DY is not drawn at all, and the line under the preview says "This label could not be drawn. Check the ZPL and its graphic data." A font that is stored only on your printer is not in the file, so the viewer prints that text in font 0 and lists the command as not drawn, such as "Not drawn: ^A@ (1)".
UTF-8 text with ^CI28
^CI chooses the character set the printer reads field data in. ^CI28 is Unicode in UTF-8, for accented letters and other scripts; a printer starts with ^CI0, a single-byte set for the U.S.A. Zebra recommends a ^CI command at the start of every ZPL script, and notes that 28 to 30 need firmware V60.14.x, V50.14.x or later.
A character can also be written as its bytes in hexadecimal: put ^FH before ^FD and an underscore before each byte. With ^CI28, ^FH^FDCaf_C3_A9^FS prints Café, because C3 A9 is é in UTF-8. The viewer reads a file as UTF-8, or as Windows-1252 when it is not UTF-8, and its stand-in fonts draw accented letters such as é and ñ.
Why the letters differ slightly from your printer's
Zebra's fonts are licensed, so the viewer uses open fonts in their place at Zebra's sizes. For fonts A to H it draws DejaVu Sans Mono letters (the bold weight for B) inside the cell, gap and baseline that Zebra's tables give each font. Text starts and ends where the printer puts it and takes the same space, but the letters look slightly different from a printed label.
The viewer has no stand-in for fonts P to V. Text in those fonts is drawn in font 0 at the height and width the command gives, and the line under the preview does not list it as not drawn, so check such labels on the printer itself.
Frequently asked questions
What fonts are built into Zebra printers?
Zebra's guide says most Zebra printers come with 15 bitmapped fonts and one scalable font. A label calls them by a letter or digit: A to H, P to V, and 0 for the scalable font. The symbol font GS is used by the ^GS command.
What is font 0 in ZPL?
The scalable font, which Zebra's spec sheets name CG Triumvirate Bold Condensed. Unlike the bitmapped fonts, it can be any height and width in dots, set with ^A0 or ^CF0.
What is the default font in ZPL?
Font A, 9 dots high and 5 wide, until the label changes it with ^CF.
What does ^A0N,50,50 mean?
Font 0, normal orientation (not rotated), 50 dots high and 50 dots wide. At 8 dpmm (203 dpi) the text is about a quarter of an inch high.
How do I make text bigger in ZPL?
Raise the height and width in ^A. Font 0 takes any size. A bitmapped font grows only in whole multiples of its base size, up to 10 times, so font D goes from 18 × 10 to 36 × 20 dots and on in steps of the same size.
Why does my text print smaller on a 300 dpi printer?
Font sizes are in dots, and a 300 dpi printhead's dots are smaller. To keep font 0 the same size on paper, raise its height and width by about half, the ratio of 304.8 to 203.2 dots per inch. A bitmapped font can only grow in whole steps of its base size.
How do I print accented letters or UTF-8 text in ZPL?
Put ^CI28 at the start of the label, so fields are read as UTF-8, and save the file as UTF-8. You can also write a character as its bytes with ^FH, such as Caf_C3_A9 for Café.
Can I use my own TrueType font in ZPL?
Yes, on the printer: download it with ~DY, then call it with ^A@ or give it a letter with ^CW. This viewer does not draw downloaded fonts: a file that downloads one shows a message instead of the label.
Is the ZPL I edit uploaded?
No. The font sheet and your changes are drawn in your browser and never leave your device. The site counts visits with Google Analytics, which never receives your ZPL, and it has no session recording.