^FT
Field TypesetPreview: partialPlaces a field by its baseline rather than its top-left corner, so text of different sizes lines up.
Syntax
^FTx,y,zParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| x | Distance from the left edge, in dots. Omit it to keep the current position.0 to 32000 dots from the left edge | Current position |
| y | Baseline position measured from the top edge, in dots. Omit it to keep the current position.0 to 32000 dots from the top edge | Current position |
| z | Justification for the field. Requires firmware V60.14.x or later.0 left, 1 right, 2 auto | Last ^FW value, otherwise 0 |
How it works
^FT positions a field by the baseline of the text — the line the letters sit on — instead of the top-left corner used by ^FO. When you place two pieces of text of different heights, ^FT is what makes them share a bottom edge instead of a top edge.
Both coordinates are optional. ^FT,180 keeps the current x and moves only vertically, and ^FT100 keeps the current y. This makes it convenient for laying out a column of fields that share a left margin.
For barcodes, ^FT places the bottom of the bars, not counting the human-readable line. That is a real difference from ^FO, which places the top of the symbol, and it is worth checking when converting a template from one to the other.
Example
^XA
^FT50,120^A0N,40,40^FDBaseline^FS
^FT,180^A0N,40,40^FDSame x^FS
^XZRendering…
How the preview on this site handles it
Positions and the omitted-parameter behaviour are reproduced. The justification parameter z is ignored, and the baseline is approximated with a browser font rather than the printer-resident one.
Common mistakes
- Swapping ^FO for ^FT without adjusting y. The field moves up by roughly the character height, because y now means the baseline.
- Assuming ^FT,180 resets x to zero. It keeps whatever x the previous field used.
- Forgetting that ^FT on a barcode positions the bottom of the bars, so tall barcodes grow upwards.