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?
Label vs PrintString padding
Moderator: Mods
Re: Label vs PrintString padding
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
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
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
Re: Label vs PrintString padding
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
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
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
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital