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

L Lee Warne 3 years 7 months ago
1961 3 0

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.

Please Register or Login to post a reply

3 Replies

l lilian bideau

please can you explain me better with some exemple ?

D Dmitry Prokhorov

Hello Lee,

As you can see in ZPL programming manual https://www.zebra.com/content/dam/zebra/manuals/printers/common/program…
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

L Lee Warne

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

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