got GLYPH_INDEX working

This commit is contained in:
Jay Sorg 2011-11-23 13:11:28 -08:00
parent 873b1fbf62
commit a5f878b536
4 changed files with 18 additions and 3 deletions

View File

@ -308,7 +308,7 @@ struct _GLYPH_INDEX_ORDER
sint32 x; sint32 x;
sint32 y; sint32 y;
uint32 cbData; uint32 cbData;
uint8* data; uint8 data[256];
}; };
typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER; typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER;

View File

@ -168,7 +168,16 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
void update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index) void update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index)
{ {
rdpGlyphCache* glyph_cache;
glyph_cache = context->cache->glyph;
update_process_glyph_fragments(context, glyph_index->data, glyph_index->cbData,
glyph_index->cacheId, glyph_index->ulCharInc, glyph_index->flAccel,
glyph_index->backColor, glyph_index->foreColor, glyph_index->x, glyph_index->y,
glyph_index->bkLeft, glyph_index->bkTop,
glyph_index->bkRight - glyph_index->bkLeft, glyph_index->bkBottom - glyph_index->bkTop,
glyph_index->opLeft, glyph_index->opTop,
glyph_index->opRight - glyph_index->opLeft, glyph_index->opBottom - glyph_index->opTop);
} }
void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index) void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index)
@ -265,7 +274,8 @@ void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGly
if (prevGlyph != NULL) if (prevGlyph != NULL)
{ {
xfree(prevGlyph->aj); xfree(prevGlyph->aj);
Glyph_Free(glyph_cache->context, prevGlyph); /* hack jsorg71 */
//Glyph_Free(glyph_cache->context, prevGlyph);
xfree(prevGlyph); xfree(prevGlyph);
} }

View File

@ -330,6 +330,11 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */ stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */
stream_write_uint16(s, 0); /* numberFonts (2 bytes) */ stream_write_uint16(s, 0); /* numberFonts (2 bytes) */
stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */ stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */
/* hack jsorg71 */
settings->order_support[NEG_FAST_INDEX_INDEX] = 0;
settings->order_support[NEG_FAST_GLYPH_INDEX] = 0;
stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */ stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */
stream_write_uint16(s, 0); /* textFlags (2 bytes) */ stream_write_uint16(s, 0); /* textFlags (2 bytes) */
stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */

View File

@ -929,7 +929,7 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
if (orderInfo->fieldFlags & ORDER_FIELD_22) if (orderInfo->fieldFlags & ORDER_FIELD_22)
{ {
stream_read_uint8(s, glyph_index->cbData); stream_read_uint8(s, glyph_index->cbData);
stream_get_mark(s, glyph_index->data); memcpy(glyph_index->data, s->p, glyph_index->cbData);
stream_seek(s, glyph_index->cbData); stream_seek(s, glyph_index->cbData);
} }
} }