> Can anyone explain why things work this way?

Let me try :-).

The formula (in lcd-16bit.c)

    lcd_getstringsize(str, &w, &h);
    xpos = xmargin + x*w / utf8length(str);
    ypos = ymargin + y*h;

seems to be a way of trying to come up with an average character cell
width the display.  However, it's going to vary widely for different
strings.  Perhaps a better formula would be

    struct font *f = font_get(curfont);
    xpos = xmargin + x * f->maxwidth;
    ypos = ymargin + y * f->height;

This would be a more faithful replication of a character-cell layout.

Bill

Reply via email to