I need to implement horizontal scrolling i.e. just a portion of a line of text. Now I could work with string manipulation, but I'm using a proportional font, so a string of a given length (in chars) doesn't always fill the same space on the display (in pixels). I prefer not to use a fixed-width font due to space constraints.

I really think there should be support in the display to scroll, say a label, and I wonder if it's maybe an oversight on my part and I just couldn't find the right commands to do it in the manual. If there is however no support for this on the display, I need a way to determine the actual length of a given string in pixels, using a given font.

I think I could parse the font files for the character width information, but maybe there's an easier way to achieve horizontal scrolling in a label?

Also I'm reluctant to implement this on the host as it will be messy: How does the host know which font ID on the display corresponds to what font file? And why should the host have to care? This should really be done right on the display!

Some notes:
- The code is designed to run from a timer event (example: every 500ms)
- The assumed max number of chars per line is 27 (for default font #1). change accordingly!
- _ArtistAndTitle is the string variable containing the line to display
- _artistTitleScrollPosition++ is a global int variable (you must add) used to track scrolling position
- the code every time the code runs, it will advance scrolling by one char

I still need something for proportional font scrolling. Ideas, anyone?

For a scrolling, or marquee effect, a fixed width font is definitely preferred. Your GLK19264 ships with a Small Filled font in slot 1 which is a monospaced and 6x7 pixels size. It also has a Scroll Screen command which should work well for this application. I wrote up a quick demo to showcase marquee style text scrolling on the GLK19264.

Unfortunately, we can only pack a fraction of the power available on a PC into the GLK19264, and while it does allow for a number of advanced features, text scrolling is a rather intensive operation for the display to handle. Given a fixed width font, implementation on the PC side can be quite clean.

Clark wrote:It also has a Scroll Screen command which should work well for this application.

Exactly what I've been looking for, FE 59. Thanks for the pointer!

Clark wrote: Unfortunately, we can only pack a fraction of the power available on a PC into the GLK19264

I see. What kind of controller does it use? ATmega? PIC? Something more exotic perhaps? Just curious... Anyway, I shall see about parsing character width information from a font file. This will have to be properly set up, but should enable us then to use proportional fonts. Will post code here, I guess :)

It sounds like you have a direction now, I'll leave you to writing the code.

If you're looking for the character size information for a specific font, any time a font is generated in MOGD# a folder containing an image for every character is created in the ...\Program Files (x86)\Matrix Orbital\MogdSharp\Fonts directory. Alternatively, you can download any font file from the display and parse the header for character data using the information in your manual.

Of course, we'd love to see any code you'd be willing to share once it's all done.

We always appreciate customer feedback and will make improvements where we can. The new GLK19264 units were recently upgraded to a more exotic LPC1700 series controller from NXP. It does have more processing power than the old Atmega164P, but I can't confirm that it will afford the resources required to implement full text scrolling on the display side.