Merge pull request #1435 from dpoe/stable-1.1

Apply glyph fragment offset after fragment
This commit is contained in:
Marc-André Moreau 2013-09-16 13:38:46 -07:00
commit d8d7a9c1c6

View File

@ -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;