raspberrypi/userland — pull request #195 by chinasaur (2014-08-17 23:56:20+00:00)
Title: Fix bug in y offset of text background.

vgft_font_draw renders its text with the lower left corner (without descenders) of the first line at the given x/y start position. Unfortunately, for multiline text this means that the y position is in the middle of the rendered block. This was making the background rendering incorrectly offset for multiline text.

I tried to correct this with minimal impact to the existing interface. The background now renders in the right position (modulo some y-kerning that I ignored).

I would like to be able to render backgrounds with more padding, so I will probably send a follow-up PR exporting the new vgft_first_line_y_offset information through vgfont.h so that clients can also correctly offset backgrounds and generally have correct information about the y position of rendered text.