Text & Fonts
Positioning and Text Formatting – ^FO, ^FT, ^FB, ^FR, ^FH
^FO50,50^FDLeft-aligned text^FS ; origin = top-left of the text
Field origin: ^FO vs ^FT
^FO50,50^FDLeft-aligned text^FS ; origin = top-left of the text
^FT50,50^FDText baseline^FS ; origin = baseline of the first line
^FO is the common choice; ^FT helps when text must sit exactly on a line.
Wrapped / boxed text: ^FB
^FB300,3,0,L,0^FDThis text wraps at 300 dots and can have up to 3 lines.^FS
^FBwidth,lines,spacing,alignment,ellipsis
- width in dots, line count, line spacing (0 = auto), alignment L/C/R/J, ellipsis 0/1.
In the zplCloud designer the Text fitting property of each text field decides how many lines are
produced: Truncate emits ^FB...,1,... (a single line), Wrap limits the lines to the field
height, and Shrink scales the font instead - the field is then printed as a graphic (^GFA) and
the printer font is not used.
Reverse / white-on-black: ^FR
^FO50,50^GB300,60,60,B^FS ; black box
^FO60,60^FR^FDWhite text^FS ; ^FR = reverse field
^FR must appear before the ^FD of the text field.
Special characters: ^FH
^FH^FDHello_7FWorld^FS ; _7F = literal "~" (caret = _5E, tilde = _7F)
^FH enables hex escaping: _5E = ^, _7F = ~, _5F = _.
Fields with variables (batch printing)
^XA
^FO50,50^FDArticle: ^FS
^FO50,80^FN1^FS ; variable 1
^XZ
^XA^FN1^FD12345^FS^XZ ; second format supplies the value
Tips
- Coordinates are dots from the top-left corner of the label.
- Rotate a field with
^A0R(font command) or^BCR(barcode) – orientation N/R/I/B = 0/90/180/270°. - The zplCloud designer handles rotation at the model level (fields are transformed, label size swapped) – the generated ZPL stays simple and portable.