scummvm/scummvm — pull request #499 by bgK (2014-09-03 19:40:57+00:00)
Title: GRAPHICS: Fix TTF rendering with negative left side glyph bearings

Our TTF can be sometimes produce slightly incorrect character spacing.
This is due to a hack which prevented invalid memory writes
when drawing the first character of a string by ignoring negative left
side bearings for all characters.

This patch removes that hack, and uses a trick to fix rendering by
handling the left side bearing through the kerning instead of the advance.
Using the kerning allows to check whether we are rendering the first
character of a string and to ignore the left side bearing only in that case,
as should be done.

FreeType glyph metrics, for reference:
![image](https://cloud.githubusercontent.com/assets/52294/4140147/b58e5826-33a1-11e4-9573-595754e63a94.png)

The incorrect rendering is quite noticable in Myst III:
![myst3-bad-rendering](https://cloud.githubusercontent.com/assets/52294/4140164/eab7285c-33a1-11e4-9d00-875da133d727.png)

Fixed rendering:
![myst3-good-rendering](https://cloud.githubusercontent.com/assets/52294/4140168/f9fb8010-33a1-11e4-9298-ea780a24dd1a.png)