From eb2f3a02b465a59d29578248f25d2c2726592150 Mon Sep 17 00:00:00 2001 From: Daryl Poe Date: Tue, 20 Aug 2013 12:00:36 -0600 Subject: [PATCH] apply glyph fragment offset after fragment --- libfreerdp/cache/glyph.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index 14f2f69dd..a1abf9170 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -48,6 +48,7 @@ void update_process_glyph(rdpContext* context, BYTE* data, int* index, if ((ulCharInc == 0) && (!(flAccel & SO_CHAR_INC_EQUAL_BM_BASE))) { + /* Contrary to fragments, the offset is added before the glyph. */ (*index)++; offset = data[*index]; @@ -111,6 +112,12 @@ void update_process_glyph_fragments(rdpContext* context, BYTE* data, UINT32 leng if (fragments != NULL) { + for (n = 0; n < (int) size; n++) + { + update_process_glyph(context, fragments, &n, &x, &y, cacheId, ulCharInc, flAccel); + } + + /* Contrary to glyphs, the offset is added after the fragment. */ if ((ulCharInc == 0) && (!(flAccel & SO_CHAR_INC_EQUAL_BM_BASE))) { if (flAccel & SO_VERTICAL) @@ -118,11 +125,6 @@ void update_process_glyph_fragments(rdpContext* context, BYTE* data, UINT32 leng else x += data[index + 2]; } - - for (n = 0; n < (int) size; n++) - { - update_process_glyph(context, fragments, &n, &x, &y, cacheId, ulCharInc, flAccel); - } } index += (index + 2 < (int) length) ? 3 : 2;