sharpdx/SharpDX — pull request #245 by xanather (2014-01-09 09:01:49+00:00)
Title: Fix https://github.com/sharpdx/SharpDX/issues/236

Instead of checking (x > 0f) it instead uses the index to determine whether this is the first character.

With 1 pixel width letters before there was no offset addition to the X at

x += glyph->XAdvance + Spacing;

meaning the next iteration will still think it is the first character since X still would have been 0.

The only drawback is that issue https://github.com/sharpdx/SharpDX/issues/86 is back but only if the whitespace is the first character.

Mostly trial and error since I had no knowledge of glyphs/etc... before this.