^CF sets the default font that applies to all subsequent text fields that don't have an explicit font command. This avoids repeating ^A0 (or another font selector) before every single field on a label.
The first parameter selects the font (0 for the built-in scalable font, or a letter A–Z for Zebra's bitmap fonts). The second and third parameters optionally set the default height and width.
Once set, ^CF's font choice persists for all fields in the current format until another ^CF or explicit ^A command overrides it. This makes it ideal to place once at the top of a format after ^XA.
A common pattern is to set a body-text default with `^CF0,28,28` and then override with explicit ^A0 only on fields that need a different size. This keeps ZPL concise without sacrificing flexibility.
^CF does not affect barcode commands — ^BC, ^BQ, etc. have their own font/interpretation-line settings.
Syntax
^CFf[,h,w]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| f | character (0 or A–Z) | 0 | Font to use as default: 0 = scalable CG Triumvirate, A–Z = Zebra bitmap fonts. |
| h | integer | 9 | Default character height in dots. |
| w | integer | 5 | Default character width in dots. |
Examples
Set default font and size, then use implicitly
Try in Viewer^XA ^CF0,30,30 ^FO50,30^FDLine 1 — uses CF default^FS ^FO50,70^FDLine 2 — also uses CF default^FS ^FO50,120^A0N,50,50^FDOverride to large^FS ^XZ
Mixed sizes with a CF baseline
Try in Viewer^XA ^CF0,28,28 ^FO50,30^A0N,50,50^FDHeader^FS ^FO50,95^FDBody text at CF default size^FS ^FO50,135^FDSecond body line^FS ^XZ
Common Mistakes
- !Setting ^CF after field definitions — only subsequent fields pick up the new default.
- !Omitting h and w — the default ZPL font size (h=9, w=5) is very small; most production labels need explicit values.
- !Using ^CF to try to set barcode properties — barcode commands have their own parameter sets.