/* Returns the width & height in pixels that a string will occupy on the screen if drawn using LCDD_DrawString.  */
void LCDD_GetStringSize(const char *pString, unsigned int *pWidth, unsigned int *pHeight)
/* Returns the width & height in pixels that a string will occupy on the screen if drawn using LCDD_DrawString.  */
void LCDD_GetStringSize(const char *pString, unsigned int *pWidth, unsigned int *pHeight)
{
    unsigned int width = 0;
    unsigned int height = gFont.height;
    while (*pString != 0) {
        if (*pString == '\n') {
            height += gFont.height + 2;
        }
        else {
            width += gFont.width + 2;
        }
        pString++;
    }
    if (width > 0) width -= 2;
    if (pWidth) *pWidth = width;
    if (pHeight) *pHeight = height;
}