Label vs PrintString padding

GTT TFT Support

Moderator: Mods

Post Reply
dr21702
LCD!
Posts: 12
Joined: Mon Mar 23, 2009 9:35 am

Label vs PrintString padding

Post 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?

Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: Label vs PrintString padding

Post 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
Raquel Malinis
Design and Development
Matrix Orbital

dr21702
LCD!
Posts: 12
Joined: Mon Mar 23, 2009 9:35 am

Re: Label vs PrintString padding

Post 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.

Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: Label vs PrintString padding

Post 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
Raquel Malinis
Design and Development
Matrix Orbital

Post Reply