app_server: Don't offset first glyph with additional spacing

Untested, but should be correct... will test in a minute.
This commit is contained in:
Stephan Aßmus 2014-02-20 17:40:11 +01:00
parent ab29480f78
commit 24c156daf5

View File

@ -219,7 +219,7 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer,
const char* start = utf8String;
while ((charCode = UTF8ToCharCode(&utf8String))) {
if (offsets) {
if (offsets != NULL) {
// Use direct glyph locations instead of calculating them
// from the advance values
x = offsets[index].x;
@ -233,7 +233,7 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer,
x += advanceX;
y += advanceY;
if (delta)
if (delta != NULL && index > 0)
x += IsWhiteSpace(charCode) ? delta->space : delta->nonspace;
}