ZPLToolkit

^A

Scalable / Bitmap FontPreview: partial

Selects the font, size and rotation for the next field. ^A0 is the scalable font used by most modern templates.

This page also covers ^A0.

Syntax

^Afo,h,w

Parameters

ParameterDescription and accepted valuesIf omitted
fThe font, appended directly to the command: ^A0 for the scalable font, ^AA to ^AH for the bitmap ones.A to Z and 0 to 9A
oRotation of the field.N normal, R 90°, I 180°, B 270°Last ^FW value, else N
hCharacter height in dots.10 to 32000 dots for scalable fonts15 dots
wCharacter width in dots.10 to 32000 dotsProportional to the height

How it works

^A picks the font for the field that follows. The font name is part of the command itself, not a parameter: ^A0N,30,30 selects font 0, ^ADN,36,20 selects font D. Font 0 is the scalable CG Triumvirate that most templates use; the lettered fonts A through H are fixed bitmap fonts built into the printer.

For scalable fonts, height and width are free values in dots. For bitmap fonts they must be multiples of the font's base cell, and the printer rounds down to the nearest valid size rather than reporting an error — which is why a bitmap font sometimes ignores the size you asked for.

Omitting the width makes the printer scale it proportionally to the height, which is almost always what you want. The orientation parameter rotates the field: N normal, R 90°, I 180° and B 270°.

Example

ZPL
^XA
^FO40,40^A0N,50,50^FDScalable 0^FS
^FO40,120^A0N,25,25^FDSmaller^FS
^XZ

Rendering…

The same scalable font at two sizes.
Open in the viewer

How the preview on this site handles it

Height and width are honoured, but the preview substitutes a browser font for the printer-resident one, so glyph widths differ slightly. Rotation is not applied yet — every orientation previews as N. Only ^A0 and bare ^A are recognised; the bitmap fonts ^AA to ^AZ are reported by the validator as unsupported.

Common mistakes

  • Assuming a bitmap font honours any height. It snaps down to a multiple of its base cell.
  • Specifying a width equal to the height. That stretches the glyphs; leave it out for natural proportions.
  • Expecting the size to carry over. ^A applies to one field; use ^CF to change the default for many.

See also