I was working on a project usig an avr controller and glcd for showning the user options menu. For the menu entries we were using sprintf function to create a string and then passing it to the glcd library functions. Inorder to align the printed text, I searched for the justification options availale with printf/sprintf functions.
After a lot of searching, I found that only left justification and right justification supported, so we have to use some tecniques or custom functions to align the text. Finally from a forum, I got a smart piece of code.