How Download a new Font with ZPL code?

// Expert user has replied.
L Luis Lopes 2 years 10 months ago
53 2 0

How Download a new Font with ZPL code?
Hi everyone!
I'm trying to download a new font for Zebra(GC420t) using ZPL.
This is the code that i've use for this job.:
teste += "~DYR:OptimaLTStd,B,T,t,w,data"
and for printing with font:
teste += "^XA "
teste += "^FWB "
teste += "^FO290,150 "
teste += "^A2,36,20,R:OptimaLTStd.FNT"
teste += "^FD " & Etiqueta.Quantidade & "Kg ^FS "
teste += "^FO335,90 "
teste += "^A0,36,20,R:OptimaLTStd.FNT "
teste += "^FD Validade:" & Etiqueta.Validade & " ^FS"
teste += "^FO380,150 "
teste += "^A0,36,20,R:OptimaLTStd.FNT "
teste += "^FD " & Etiqueta.Lote & " ^FS "
teste += "^XZ" 'Encerra o documento
Whats happens: that font it's not found and the printer is using default font
model: GC420t

Please register or login to post a reply

2 Replies

S Steven Si

Hi Luis,
Firstly, according to the ZPL documentation on ~DY, the ~DY command is the preferrred for True Type fonts. Based on the parameters you specified in ~DY command

~DYR:OptimaLTStd,B,T,t,w,datait tells me that the font data is uncompressed, and the font file extension on the printer will be TTF. So the font file on the printer are are looking for would be R:OptimaLTStd.TTF. Can you confirm that OptimaLTStd.TTF exist on R: drive on the printer? Please note, the R: drive means the RAM memorry on the printer. 
Secondly, the following command is incorrect. Please refer to the ZPL doc on ^A for detail. You need to use ^CW command to assign a font identifier to the newly downloaded TTF font, then you can use ^A command to specify the font orientation and size. Hope this helps.

teste += "^A2,36,20,R:OptimaLTStd.FNT"
 
 

A Alexander Palchikov

Hi Luis
As far as I understand you use bitmap font. It looks like you need to use ~DB instead of ~DY.Also the documentation says that filename should have 1 to 8 alphanumeric characters.File extension is required as well.
https://www.zebra.com/content/dam/zebra/manuals/printers/common/programm...
Are you sure that OptimaLTStd.FNT file exists in R: drive?Can you please share a list of all fonts loaded in your printer?
Alexander PalchikovSoftware Engineer, Kutir MobilityPosted on behalf of Zebra Technologies

CONTACT
Can’t find what you’re looking for?