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 */
|
/* Store a glyph in the font cache */
|
||||||
void cache_put_font(uint8 font, uint32 character, uint16 baseline,
|
void cache_put_font(uint8 font, uint16 character, uint16 offset,
|
||||||
uint16 width, uint16 height, HGLYPH pixmap)
|
uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap)
|
||||||
{
|
{
|
||||||
FONTGLYPH *glyph;
|
FONTGLYPH *glyph;
|
||||||
|
|
||||||
@ -97,6 +97,7 @@ void cache_put_font(uint8 font, uint32 character, uint16 baseline,
|
|||||||
if (glyph->pixmap != NULL)
|
if (glyph->pixmap != NULL)
|
||||||
ui_destroy_glyph(glyph->pixmap);
|
ui_destroy_glyph(glyph->pixmap);
|
||||||
|
|
||||||
|
glyph->offset = offset;
|
||||||
glyph->baseline = baseline;
|
glyph->baseline = baseline;
|
||||||
glyph->width = width;
|
glyph->width = width;
|
||||||
glyph->height = height;
|
glyph->height = height;
|
||||||
|
7
orders.c
7
orders.c
@ -722,7 +722,7 @@ static void process_fontcache(STREAM s)
|
|||||||
{
|
{
|
||||||
HGLYPH bitmap;
|
HGLYPH bitmap;
|
||||||
uint8 font, nglyphs;
|
uint8 font, nglyphs;
|
||||||
uint16 character, baseline, width, height;
|
uint16 character, offset, baseline, width, height;
|
||||||
uint8 *data, *rev_data, in, out;
|
uint8 *data, *rev_data, in, out;
|
||||||
int i, j, datasize;
|
int i, j, datasize;
|
||||||
|
|
||||||
@ -734,7 +734,7 @@ static void process_fontcache(STREAM s)
|
|||||||
for (i = 0; i < nglyphs; i++)
|
for (i = 0; i < nglyphs; i++)
|
||||||
{
|
{
|
||||||
in_uint16_le(s, character);
|
in_uint16_le(s, character);
|
||||||
in_uint8s(s, 2); /* unknown */
|
in_uint16_le(s, offset);
|
||||||
in_uint16_le(s, baseline);
|
in_uint16_le(s, baseline);
|
||||||
in_uint16_le(s, width);
|
in_uint16_le(s, width);
|
||||||
in_uint16_le(s, height);
|
in_uint16_le(s, height);
|
||||||
@ -763,7 +763,8 @@ static void process_fontcache(STREAM s)
|
|||||||
bitmap = ui_create_glyph(width, height, rev_data);
|
bitmap = ui_create_glyph(width, height, rev_data);
|
||||||
xfree(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);
|
HBITMAP cache_get_bitmap(uint8 cache_id, uint16 cache_idx);
|
||||||
void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap);
|
void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap);
|
||||||
FONTGLYPH *cache_get_font(uint8 font, uint16 character);
|
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);
|
DATABLOB *cache_get_text(uint8 cache_id);
|
||||||
void cache_put_text(uint8 cache_id, void *data, int length);
|
void cache_put_text(uint8 cache_id, void *data, int length);
|
||||||
uint8 *cache_get_desktop(uint32 offset, int cx, int cy);
|
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
|
typedef struct _FONTGLYPH
|
||||||
{
|
{
|
||||||
|
uint16 offset;
|
||||||
uint16 baseline;
|
uint16 baseline;
|
||||||
uint16 width;
|
uint16 width;
|
||||||
uint16 height;
|
uint16 height;
|
||||||
|
2
xwin.c
2
xwin.c
@ -518,7 +518,7 @@ void ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y,
|
|||||||
|
|
||||||
if (glyph != NULL)
|
if (glyph != NULL)
|
||||||
{
|
{
|
||||||
ui_draw_glyph(mixmode, x,
|
ui_draw_glyph(mixmode, x + (short)glyph->offset,
|
||||||
y + (short)glyph->baseline,
|
y + (short)glyph->baseline,
|
||||||
glyph->width, glyph->height,
|
glyph->width, glyph->height,
|
||||||
glyph->pixmap, 0, 0,
|
glyph->pixmap, 0, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user