From 24c156daf59f68c8e07a268257ba39b7f55cdaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 20 Feb 2014 17:40:11 +0100 Subject: [PATCH] app_server: Don't offset first glyph with additional spacing Untested, but should be correct... will test in a minute. --- src/servers/app/font/GlyphLayoutEngine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servers/app/font/GlyphLayoutEngine.h b/src/servers/app/font/GlyphLayoutEngine.h index 2039cd7aa4..d03619c49e 100644 --- a/src/servers/app/font/GlyphLayoutEngine.h +++ b/src/servers/app/font/GlyphLayoutEngine.h @@ -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; }