2735 |
|
|
2736 |
/* Encapsulate the different ways of displaying text under W32. */ |
/* Encapsulate the different ways of displaying text under W32. */ |
2737 |
|
|
2738 |
void W32_TEXTOUT (s, x, y,chars,nchars) |
static void |
2739 |
|
w32_text_out (s, x, y,chars,nchars) |
2740 |
struct glyph_string * s; |
struct glyph_string * s; |
2741 |
int x, y; |
int x, y; |
2742 |
wchar_t * chars; |
wchar_t * chars; |
2750 |
else if (s->first_glyph->w32_font_type == UNICODE_FONT) |
else if (s->first_glyph->w32_font_type == UNICODE_FONT) |
2751 |
ExtTextOutW (s->hdc, x, y, 0, NULL, chars, nchars, NULL); |
ExtTextOutW (s->hdc, x, y, 0, NULL, chars, nchars, NULL); |
2752 |
else |
else |
2753 |
ExtTextOut (s->hdc, x, y, 0, NULL, (char *) chars, |
ExtTextOutA (s->hdc, x, y, 0, NULL, (char *) chars, |
2754 |
nchars * charset_dim, NULL); |
nchars * charset_dim, NULL); |
2755 |
} |
} |
2756 |
|
|
2757 |
#if GLYPH_DEBUG |
#if GLYPH_DEBUG |
3484 |
char1b[i] = BYTE2 (s->char2b[i]); |
char1b[i] = BYTE2 (s->char2b[i]); |
3485 |
|
|
3486 |
/* Draw text with TextOut and friends. */ |
/* Draw text with TextOut and friends. */ |
3487 |
W32_TEXTOUT (s, x, s->ybase - boff, s->char2b, s->nchars); |
w32_text_out (s, x, s->ybase - boff, s->char2b, s->nchars); |
3488 |
} |
} |
3489 |
if (s->font && s->font->hfont) |
if (s->font && s->font->hfont) |
3490 |
SelectObject (s->hdc, old_font); |
SelectObject (s->hdc, old_font); |
3531 |
else |
else |
3532 |
{ |
{ |
3533 |
for (i = 0; i < s->nchars; i++, ++s->gidx) |
for (i = 0; i < s->nchars; i++, ++s->gidx) |
3534 |
W32_TEXTOUT (s, x + s->cmp->offsets[s->gidx * 2], |
w32_text_out (s, x + s->cmp->offsets[s->gidx * 2], |
3535 |
s->ybase - s->cmp->offsets[s->gidx * 2 + 1], |
s->ybase - s->cmp->offsets[s->gidx * 2 + 1], |
3536 |
s->char2b + i, 1); |
s->char2b + i, 1); |
3537 |
} |
} |