Calculating height of a scalable font when only given width

T Tre Calhoun 3 years 7 months ago
197 2 0

When giving font 0 a width but no height, the height should be calculated based on the standard font matrix. For font 0, that would be h:15 w:12. So for width of 65, the height should be calculated to be 81 based on that ratio, but when printing A0N,81,65 it prints way bigger than it does with just the width specified. How is the height calculated based on that font matrix exactly? In my case, we are getting a zpl string from a client and doing some calculations on it. Unfortunately, only the width is ever supplied.

Please Register or Login to post a reply

2 Replies

E Efkan YILMAZ

If the h or w value is not specified in ^A0N, h, w command, the height or width will be calculated based on its corresponding h or w specified by the last ^CF command. Please see page 39 on ZPL Programming Guide. If  ^CF command was not explicitly used, then the default of h and w in ^CF at power up are 9 and 5 respectively, as described on page 128 on ZPL Programming Guide. Hope this helps.

T Tre Calhoun

That's what I had thought, but when printing it out, it looks like it just copies that other value over. No CF is ever explicitly used. So when printing   ^A0N,10,    ^A0N,10,10   and   ^a0N,,10   , they all look the same.  But only with this one font. Trying the same with the A font and it appears to follow it's standard font matrix with the larger height calculated off of the given width. So, with font A with those same values, they are all different sizes, but with font 0, they are all the same. I'm just wondering why this one font is different (because its scalable?) and if it is printer dependent. I can follow the rule of "h is missing so copy w to it" but only if it will work that way with all printers.

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