Page 1 of 1
Label vs PrintString padding
Posted: Sat Dec 07, 2024 7:49 pm
by dr21702
When drawing a Label aligned top/left at a particular coordinate the font is drawn with some additional top and left padding versus when drawn using PrintString at the same coordinate. PrintString appears to be drawn metrically correct to the font.
Can you give me any insight on how this additional padding on Label is calculated?
Re: Label vs PrintString padding
Posted: Mon Dec 09, 2024 9:33 am
by Raquel
Hello,
Can you please tell me which Label command you are using?
There are two types of Label commands on the GTT:
- legacy command 254 16, 254 17
- GTT2.5 command from GTT Designer
Thank you,
Raquel
Re: Label vs PrintString padding
Posted: Wed Dec 18, 2024 4:28 pm
by dr21702
I'm using all legacy commands 256 16/17 for label, 256 36/37 to print string. I'm trying to make it so the placement in my custom Windows design UI placement matches up what is displayed. I can calculate the font height from pitch fine, commands 256 36/37 match perfectly, but the Label from commands 256 16/17 have this extra padding.
Re: Label vs PrintString padding
Posted: Fri Dec 20, 2024 8:48 am
by Raquel
Hello,
I apologize, as it turns out the same function is used for the Labels from legacy and GTT2.5 commands.
Unfortunately, there is no way to match the exact pixel locations between a label and a print string.
Thank you,
Raquel