Respect x offset in font information.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@19 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
a7bb5b3af9
commit
71830eeb65
5
cache.c
5
cache.c
@ -85,8 +85,8 @@ FONTGLYPH *cache_get_font(uint8 font, uint16 character)
|
||||
}
|
||||
|
||||
/* Store a glyph in the font cache */
|
||||
void cache_put_font(uint8 font, uint32 character, uint16 baseline,
|
||||
uint16 width, uint16 height, HGLYPH pixmap)
|
||||
void cache_put_font(uint8 font, uint16 character, uint16 offset,
|
||||
uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap)
|
||||
{
|
||||
FONTGLYPH *glyph;
|
||||
|
||||
@ -97,6 +97,7 @@ void cache_put_font(uint8 font, uint32 character, uint16 baseline,
|
||||
if (glyph->pixmap != NULL)
|
||||
ui_destroy_glyph(glyph->pixmap);
|
||||
|
||||
glyph->offset = offset;
|
||||
glyph->baseline = baseline;
|
||||
glyph->width = width;
|
||||
glyph->height = height;
|
||||
|
7
orders.c
7
orders.c
@ -722,7 +722,7 @@ static void process_fontcache(STREAM s)
|
||||
{
|
||||
HGLYPH bitmap;
|
||||
uint8 font, nglyphs;
|
||||
uint16 character, baseline, width, height;
|
||||
uint16 character, offset, baseline, width, height;
|
||||
uint8 *data, *rev_data, in, out;
|
||||
int i, j, datasize;
|
||||
|
||||
@ -734,7 +734,7 @@ static void process_fontcache(STREAM s)
|
||||
for (i = 0; i < nglyphs; i++)
|
||||
{
|
||||
in_uint16_le(s, character);
|
||||
in_uint8s(s, 2); /* unknown */
|
||||
in_uint16_le(s, offset);
|
||||
in_uint16_le(s, baseline);
|
||||
in_uint16_le(s, width);
|
||||
in_uint16_le(s, height);
|
||||
@ -763,7 +763,8 @@ static void process_fontcache(STREAM s)
|
||||
bitmap = ui_create_glyph(width, height, rev_data);
|
||||
xfree(rev_data);
|
||||
|
||||
cache_put_font(font, character, baseline, width, height, bitmap);
|
||||
cache_put_font(font, character, offset, baseline,
|
||||
width, height, bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
|
2
proto.h
2
proto.h
@ -60,7 +60,7 @@ BOOL bitmap_decompress(unsigned char *output, int width, int height, unsigned ch
|
||||
HBITMAP cache_get_bitmap(uint8 cache_id, uint16 cache_idx);
|
||||
void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap);
|
||||
FONTGLYPH *cache_get_font(uint8 font, uint16 character);
|
||||
void cache_put_font(uint8 font, uint32 character, uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap);
|
||||
void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap);
|
||||
DATABLOB *cache_get_text(uint8 cache_id);
|
||||
void cache_put_text(uint8 cache_id, void *data, int length);
|
||||
uint8 *cache_get_desktop(uint32 offset, int cx, int cy);
|
||||
|
1
types.h
1
types.h
@ -76,6 +76,7 @@ typedef struct _BRUSH
|
||||
|
||||
typedef struct _FONTGLYPH
|
||||
{
|
||||
uint16 offset;
|
||||
uint16 baseline;
|
||||
uint16 width;
|
||||
uint16 height;
|
||||
|
Loading…
Reference in New Issue
Block a user