GLT240128: Printing text rotated 90

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
J^3
LCD?
Posts: 1
Joined: Sun Jun 19, 2011 12:37 pm

GLT240128: Printing text rotated 90

Post by J^3 »

Good Morning,

Has anyone used the display mentioned in the subject to print text rotated 90 degrees. My project requires the display to be mounted with the long side vertical, therefore I need to print the text accordingly.

Any help would be appreciated, thanks.

mbb33
LCD?
Posts: 2
Joined: Wed Jan 04, 2012 1:43 pm

Post by mbb33 »

I know this is an older thread but I have the same question: I too have the GLK240128 and was wondering what its abilities were regarding text rotated 90 and 180 degrees. I am contemplating what mount orientation matches my project best, and whether I have the option to write text upside-down or rotated.

I'd imagine I could emulate upside down by making an inverted font and printing the words last-character to first, but that doesn't work as well for 90 degree rotation, where the incrementing cursor position will move in the wrong direction.

Any insight greatly appreciated!
Thanks,
-Matt B

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

Post by Clark »

Hi Matt,

Unfortunately, the GLT240128 does not have a built-in screen rotation function, however, it does offer a number of features that can help you pull it off, with some work.

First, you'll need to create and upload a font in the correct orientation. Use a mono-spaced font which will allow you to accurately track the cursor location. Then, using the set cursor coordinate command you can print each subsequent character in the right location.

The GLT240128 Touch appnote uses a simple version of this method in the display class to track cursor position and provide a function to delete characters. If you haven't already, you might check it out for some ideas.

Thanks,
Troy
Troy Clark
Design & Development
Matrix Orbital

mbb33
LCD?
Posts: 2
Joined: Wed Jan 04, 2012 1:43 pm

Post by mbb33 »

Troy,

Thanks for the speedy reply!

I started rigging up some software to rotate the fonts on my system, and upload them accordingly, much like the stock Mogd Sharp, but with the added caveat that they are fixed width and rotated appropriately. I see 180 being easier than 90, but I am hoping for both in the end.

While I have you on the line, for 90 degree rotation, the cursor seeking process should be fast enough to keep up, given it runs once per character? I'm not running anything that updates more than say... 1-2Hz in total, but I figured I'd ask before I put more time into 90 degrees and have it run sluggishly.

Thanks again, and if I get anything polished enough I'll try and post it.

-Matt B

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

Post by Clark »

Hi Matt,

Sounds like you have a plan, but speed is a concern. Acceptable drawing speeds are different for every application so it's difficult to say if this method will be fast enough for your project.

What you might try is a quick test using the cursor position command and your desired normal, upright font. That will give you a good idea of the drawing speed you can expect at 90 or 180 degrees.

Thanks,
Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply