~DT - Download TrueType Font
Downloads a TrueType font.
~DT downloads a TrueType font. The guide titles it Download Bounded TrueType
Font, and that word is the important one. ~DT carries at most 256 printable
characters, and anything larger — which means every CJK face — needs ~DU. A
converter must process the file first, and the converter writes the command, so a
~DT in a format is almost always machine-written.
Syntax
~DTd:o.x,s,dataSupport
Recognised as valid ZPL and not implemented, with no plan to.
Labelary does not support it either. Text for the downloaded typeface renders in a built-in font, so its metrics and line breaks differ. — not pinned by a test
Labelary does not implement it either, so there is no parity reference.
Parameters
d:o.xFont fileoptional · textWhere to store the font: device R:, E:, B: or A:, and a name of up to eight characters.
- Default
- R:UNKNOWN.FNT
- Invalid value
- discarded, and the default applies
- Test coverage
- The invalid-value rule is not pinned by a test.
sFont sizerequired · integerSize of the converted font in bytes. The data must carry exactly this many two-digit hexadecimal values.
- Invalid value
- enough to make the whole command be ignored. The printer ignores the whole command when the size is wrong or missing.
- Test coverage
- The invalid-value rule is not pinned by a test.
dataFont datarequired · hexadecimalThe font file, as ASCII hexadecimal.
- Invalid value
- enough to make the whole command be ignored
- Test coverage
- The invalid-value rule is not pinned by a test.
Behavior
~DT acts on receipt and belongs outside ^XA … ^XZ. It prints nothing. The
printer stores the font under the given path, in volatile memory by default. A
power cycle then needs the font again, unless it went to flash or a card.
The size counts bytes, and the payload is two hexadecimal digits per byte. The guide ignores the whole command where the two disagree, or where either is missing. No diagnostic reports that, and the font is absent when the printer lays out the fields that want it.
After storage, ^CW binds the font to a letter that ^A and ^CF can name, or
^A@ names it directly. An outline font scales smoothly, so ^A heights are dots
rather than magnification factors.
The bound on the character count is the reason to reach for ~DU. ~DT cannot
carry a font whose glyph inventory runs past 256, and ~DU has no such limit. The
renderer implements neither command, so a field that names the font defaults to a
built-in one, and its metrics and line breaks differ from the intended typeface.
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary's table marks
~DTunsupported. — not pinned by a test - The guide's parameter table gives the extension as the fixed value
.DAT, which contradicts its own example and the command's purpose. Labelary defaults the path toR:UNKNOWN.FNT. — not pinned by a test
zpl.tools against Labelary
Where our output differs from Labelary for the same input. These are the differences that break a migration.
- The
~DSwording divergence, in the same words: Labelary saysThis ZPL command is not implemented and was ignoredwhere the report here says the command is valid ZPL the renderer does not support yet (measured 2026-08-21). Offset, size and command name agree in both engines. — pinned bytest_example_dt_truetype_font_download
Example
The download, then a field asking for the font through a ^CW alias:
~DTR:MYFONT,52010,00AF01B0C65E
^XA
^CWM,R:MYFONT.FNT
^FO50,50^AMN,40,40^FDDownloaded font, or a fallback^FS
^XZ
Related commands
~DUDownload Unbounded TrueType FontDownloads a TrueType font with a full, unrestricted character set.~DYDownload ObjectsDownloads a font or image in a native file format such as PNG, TrueType or GRF.^A@Use Font Name to Call FontSelects a downloaded or built-in font by file name rather than by letter.^CWFont IdentifierAssigns a downloaded font to one of the single-letter font slots.