Downloading Fonts to Printers the Easy Way

  • By Lee Peterson 8 Months Ago

Here's a quick way to download and store fonts on your printers by simply checking someone in at each station (as long as they're configured to print from Rock). No need to connect them all to a central PC and use Zebra Fonts and Graphics Downloader. This may make your life a whole bunch easier, especially if you're managing a whole bunch of printers.

Downloading Logos or Images to Printers the Easy Way is a companion article (you might want to read it first for more background information—this one assumes that you know how to use Zebra Setup Utilities). 

Please share if you have ideas to make this a little less "clunky".


We'll do the following:

  • Find a font you want to install
  • Convert it to hex
  • Use Zebra Setup Utilities to add the correct ZPL commands
  • Do a test download
  • Copy the code into a Rock check-in label
  • Perform a check-in at every kiosk

Let's begin.


Edit: to make this easier, I did the next few steps for you, and put the font installation file on GitHub. You can copy directly from this window (ensuring that you select the entire line) and paste it into a label as in "Create a 'label' in Rock" below.


Screen Shot 2018-07-24 at 8.06.01 AM.png

Find a font

This method works with TrueType fonts. For this exercise I'd suggest using a small font like rockcheckin.ttf . You can experiment with others, but many are huge (Arial Regular is a megabyte), and there isn't a lot of flash memory on older printers (the GX420d only has 1.5 MB). I did successfully test an 800K font. You can use the fonts displayed in the Windows Font Control Panel if you copy them out of the Windows\Fonts folder (the hex converter I used can't "see" them there).


Convert it to hex

First, write down the file size in bytes of the font file (you'll need it for the ZPL command we'll create later).

Convert the binary font file to hex with a file converter.  I used Tomeko.net (I'll bet you programmers will have better ways to do this.) Deselect the two check-boxes—you can't add anything to the file. If you're converting a large font this takes awhile, and it looks like nothing is happening, so be patient.


Screen Shot 2018-03-24 at 6.51.25 AM.png



Add the correct ZPL commands 

Open the Direct Communication utility in Zebra Setup Utilities and copy all the hex from the file converter to the upper direct communication window. Before the hex add the following:

~DUE:FILENAME,file size,

Make sure this begins with a tilde; don't include an extension in the FILENAME; and make sure you include the final comma. This will overwrite an existing identically-named file on your printer, so be careful!

For the font file I used, I entered

~DUE:ROC000,20268, added the hex, and this is what it looked like. Save this file (File->Save) in case you need it later.

Everything in ZPL requires an ^XA at the start and ^XZ at the end, except for "tilde" commands like ^DU. You can use them, as in the example, or leave out the ones surrounding the ^DUE... line.


Screen Shot 2018-03-24 at 10.22.20 AM.png


Test your creation

One caveat before we work with the printer: if the status light is ever flashing red and green, don't turn the printer off. This indicates that the printer is defragmenting the flash memory, and interrupting it can cause corruption (so sayeth Zebra).

I like to get a directory before and after I download to the printer. Open a new window in Direct Communication. Enter ^XA^WDE:^XZ, hit "F5", and a directory will print (or you can use ^HWE: and a directory displays in the lower "receive" window).

Switch back to the window containing your font file download code and hit "F5" while watching the printer status light. It should flash green as data is transferred. If it doesn't flash, recheck your code. If it starts flashing red, you blew it. Turn the printer off and back on (or you can send ^XA~JR^XZ, which resets it). Look things over, and if necessary start from scratch. This happened to me when I forgot the comma between the file size and the data.

Print another directory to make sure the font installed properly.

You can print a sample of the font with the following (of course, substitute your font's printer name):

^XA^FT50,200^A@,75,75,FILENAME.FNT^FDA B F L^FS^XZ

When you're satisfied that your process is working...


Create a "label" in Rock

Create a new label in Rock and paste the code you created into the label editor window. I like to add a directory label to my "download" label to make sure it worked (below the font code add ^XA^WDE:^XZ), or better yet, add the code from the last step to print a sample in the new font. You can have multiple label formats (everything between ^XA and ^XZ) on one label.


Check-in at every kiosk

Attach your new label to a check-in area and check someone in. If your font downloaded correctly it'll show up on the directory label (or print in your font). Now you can go around to every station and check someone in (who "fits" into the area(s) to which you've assigned the label, of course).

Now you can use your new font on check-in labels.

Here are the results of a test run, and the label code I used. You can see that ROC000.FNT is absent in the first (bottom) directory label; the generic-font characters that printed (because the icon font was absent) in the second; another directory listing the font in the third; and a final label printing the font correctly. It's like magic! All this from one Rock "label".

IMG_2838.jpg 

Screen Shot 2018-03-25 at 7.09.36 AM.png


Random thoughts

I've speculated a bit about how to handle printers you can't get to during the week (like at our remote campuses). I think it would be OK to assign this label temporarily, say, at the beginning of check-in on a Sunday, and assign someone to make sure every station gets a check-in. Or maybe leave it assigned for the first service, and remove it before the next service. You're the one who knows your setup, so you might have to get creative. I don't think it's ideal to leave the label "attached" for any longer than necessary, due to the limited write-cycle life of the flash memory in our printers (but a few hundred "writes" probably isn't a big deal, either. I don't know how the additional data transfer might affect check-in speed in high-volume situations. 

If you're configuring new printers you could have multiple labels "print" to set cutter mode (^XA^MMC^JUS^XZ) or other configuration "stuff" and download fonts and graphics all at the same time with one check-in.

I'm sure there are more uses for this technique. Let me know if you come up with any creative ideas.


I hope this helps you. Please contact me on Slack with suggestions or comments.










@lee_peterson
Spark Core Team

Spark Core Team. In a previous life I owned an auto repair shop. In the present I serve at Flatirons Community Church in Lafayette, CO as a volunteer fixer of broken things (not people -- that's up to Jesus!).