How can ZPL scale fonts to fit into a specific block?

Hi,

I've designed a label that contains a section at the bottom to hold delivery numbers.  I can't predict how many delivery numbers will be on each label, but I'd like the font to be as big as it can be for only only delivery number and then automatically get progressively smaller as up to twelve delivery numbers at sent through.

I've used other printing technologies that have a scalable option that can do this, but I can't find out how to do it using ZPL.

Any help would be appreciated.

Dmitry Prokhorov
Hello Lee,As you can see in

Hello Lee,

As you can see in ZPL programming manual https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf

The ^FB (Field Block) ZPL command has no any mention of font scaling feature. The only thing it describes is automatic increase or decrease of the block size upon a change of the font size.

As a workaround you may use scalable fonts. Then for each possible amount of delivery numbers in your field block your program can calculate needed font size and magnification factor. Then while printing your delivery numbers in a field block your program can setup font parameters that are corresponding to exact amount of numbers.

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Lee Warne
Hi Dmitry,Thanks for the

Hi Dmitry,

Thanks for the response, I think that’s the way we have to go then.

We’re already putting some code together that, by working out how long the string of delivery numbers is, we can dynamically generate the ZPL to dictate font size.

Regards,

Lee

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


lilian bideau
please can you explain me

please can you explain me better with some exemple ?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Prokhorov
Hello Lilian,

Hello Lilian,

What part of explanation is unclear? What kind of example is needed?

Dmitry Prokhorov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies
 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments