ZPLToolkit

^CF

Change Alphanumeric Default FontPreview: partial

Sets the font and size used by every following field that does not specify its own, so you can stop repeating ^A.

Syntax

^CFf,h,w

Parameters

ParameterDescription and accepted valuesIf omitted
fThe default font.A to Z and 0 to 9A
hDefault character height in dots.0 to 32000 dots9 dots
wDefault character width in dots.0 to 32000 dots5 dots

How it works

^CF changes the default font for the rest of the label. Once it is set, plain ^FO … ^FD … ^FS fields use it and there is no need to repeat ^A on each one — which is what makes long templates readable.

A later ^A on an individual field overrides the default for that field only. Setting ^CF several times through a label is the normal way to move between a heading size and a body size.

The default resets at the next ^XA unless it was saved with ^JUS. Omitting the width lets the printer scale it proportionally, exactly as with ^A.

Example

ZPL
^XA
^CF0,40
^FO40,40^FDDefault font^FS
^FO40,100^FDSame size^FS
^XZ

Rendering…

One ^CF, then two fields that need no font command of their own.
Open in the viewer

How the preview on this site handles it

Height and width are honoured. As with ^A, the font face itself is approximated by a browser font and rotation is not applied.

Common mistakes

  • Expecting ^CF to affect fields that appear before it. It only applies going forward.
  • Expecting ^CF to survive to the next label. It resets at ^XA.
  • Setting a width that does not match the font's natural ratio, which stretches every field on the label at once.

See also