Is there any command to set the font size?

GTT TFT Support

Moderator: Mods

Post Reply
pradipsangani
LCD!
Posts: 14
Joined: Sun Sep 18, 2011 11:49 pm

Is there any command to set the font size?

Post by pradipsangani »

Hi,

I have following questions for GTT480272A display:

1) Is there any command to set/change the font size?
2) What is the font size in pixels for the default fonts NinaN and small?
3) What is the default Vertical Pitch Horizontal Pitch for the default fonts? More over i dont understand the "Set Font Metrics" command. Can you please elaborate on this?
4) Is there any need to have gap of some pixels between two neighboring touch regions?
5) If i want to give Load Bitmap command (Display unit connected to a microcontroller) and if the bitmap is located at path: "bitmap\img1.jpg" on SD card, the parameter "Filename" for the command shall be (In HEX):
62 69 74 6D 61 70 5C 69-6D 67 31 2E 6A 70 67

Am i correct on this or is there anything extra that shall be added to specify the end of string?

Thanks in advance.
Pads

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Pads,

1) There is no command to change font size on the fly, but you can create and upload a number of different selections with the GTT Support Tool.
2) I don't believe NinaB and small are monospaced fonts, in which case you can use the Calculate String Extents command in your manual to determine the size of any given string.
3) Font metrics set the space between characters and lines, you can use the Get Font Metrics command to determine the current setting (I believe default is 0, 0).
4) You can set up touch regions at any location, in any size you desire. If you'd like to leave a gap but don't want it to be seen you may have to draw a larger image first behind your buttons.
5) Your bitmap string appears correct, but remember to add a 00 as the last byte to ensure your string is null terminated.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

pradipsangani
LCD!
Posts: 14
Joined: Sun Sep 18, 2011 11:49 pm

Post by pradipsangani »

Hi,

1) What would be the type of file used to store touch region information? Would it be a text file with .txt as extension?
2) I plan to have a single bitmap file occupying half the screen for all the buttons which would be touch regions without any "Down" bitmap. I.e. when a touch region is pressed, there will not any other bitmap to be displayed.

Is it possible to do this GTT480272A commands?

The command "Create A Touch Region" specifically needs "Down" parameter as input. Will the down bitmap be displayed from X and Y specified as input in the same command?

3) The value of inputs X and Y to many commands to specify Leftmost coordinate and Topmost coordinate starts from 0 or 1?

4) Does "Clear Screen" command clears the bitmap displayed on the screen? Can this command be used to clear the text from the current text area?

Thanks and regards
Pads

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Pads,

1) You can store a region (or animation or 9-slice) file with a .txt extension.
2) If you do not want the up/down visuals for a button you might use the same image for both parameters.

You could also consider using coordinate mode. If you remember the regions in your host program you can check incoming touch coordinates and preform the necessary functions for that button.

3) The coordinate of the top left corner of the screen is 0, 0.
4) The clear screen command clears the entire screen. To overwrite a section of text I would recommend drawing a filled rectangle.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply