How Download a new Font with ZPL code?

Tags: 

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

Alexander Palchikov
Hi LuisAs far as I understand

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

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Luis Lopes
Is not bitmap

Alexander,
thank you for the answer!

this font is not a bitmap, really this come in .otf or .ttf (i'can choose haha)
in the case, need transfer Optima font to the printer but using ~DY or ~DB nothing happens.
You can send one simpla exemple for donwload a new font for de printer and use to print? :D

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Steven Si
Hi Luis,Firstly, according to

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,data

it 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"

 

 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments