Printing with Multiple Fonts Using ZPL Font Linking (^FL)

Article ID: 27515176




How to link multiple font types into a single line of print.using the ZPL ^FL command.

Applies To

All ZPL enabled printers.  

Excludes: 2824 Series, 2844 Series, S4M (E53 Firmware Version), 888 DD/TT Series, MZ Series, ZQ110, EM220, EM220II


A ZPL capable printer is required as well as knowledge of ZPL programming.  


This procedure includes the steps to link multiple fonts together within a ZPL string so that multiple fonts can be used within the same line of print.  The ^FL command can link any TrueType font to associated fonts.  In the example below we will show how to link two fonts stored within printer memory (E:ANMD_S.TTF and E:TT0003M_.FNT, Andale Simplified Chinese font, and Swiss721 font) so that they can be used within the same line of text.  This same procedure will apply to linking any fonts that are stored to a printer's memory.

The ZPL command ^FL can link any TrueType font to associated fonts, making it possible for a printer to look for the character (i.e. a glyph) in the associated font should it not be found in the base font.  This is how we could print on field data string that includes English characters in Swiss721 and Chinese characters in Andale Simplified Chinese.

Description of the ^FL command from ZPL Programming Guide Read More>>



If we have a ZPL enabled printer containing the Swiss721 (E:TT0003M_.FNT) and Andale Simplified Chinese (E:ANMD_S.TTF) fonts in E: memory, the following steps would be taken to link the fonts and print the needed characters.

For linking the two fonts specified above, we send the following command to the printer.  Unless a ^JUS command is issued after the link commands, the font link will be broken on a power cycle of the printer.





In the above commands:


  • We define the font identifier (using ^CW) for E:TT0003M_.FNT as 1 and the font identifier for E:ANMD_S.TTF as 2.
  • Then, we link the extension font E:ANMD_S.TTF to the base font E:TT0003M_, with the last parameter of the command, 1.  

**Although the ^FL command description says "The supported extensions for this parameter are: .TTF and .TTE, here we see that it works with E:TT0003M_.FNT**


For verifying the result of the font linking, we sent to the printer the following ZPL commands:


User-added image

The printout is as below:

User-added image

Upon receiving the ZPL command for the label, the printer is supposed to look for all characters (glyphs) in the font TT0003M_.FNT and in this case can only fine the English ones.  Since the font ANMD_S.TTF has been linked to the font TT0003M_.FNT, the printer turns to the font ANMD_S.TTF to look for the missing characters or Chinese characters in this case.


In contrast, we may send the follow commands to the printer to see the result of using the ^A2 or ANMD_S.TTF font:


User-added image

The printout is as below:


User-added image

Example 2:

To link more than two fonts together you must include multiple ^FL commands.  This example links three fonts including the Swiss721 (E:TT0003M_.TTF) the Andale Simplified Chinese (E:ANMDS.TTF) and the Andale Japanese(E:ANMDJ.TTF). 



Addition details on ^FL command:

  • This command is available only for printers with firmware versions V60.14.x, V50.14.x or later.
  • The ^FL command provides the ability to link any TrueType font, including private character fonts, to associated fonts.
  • A font can have up to five fonts linked to it.  The printer resident font, 0.FNT is always the last font in the list of font links, but is not included in the five link maximum.
  • When linking more than two fonts, multiple ^FL commands are required.
  • If the base font does not have a glyph for the required character, the printer looks to the linked fonts for the glyph.  The font links are user-definable.
  • The font linking remains until the link is broken or the printer is turned off.  To permanently save the font linking, use the ^JUS command in the initial linking commands.



Helpful Information

ZPL Programming Manual  Read More>>



Q12014 ZtechNewsletter