* If we're using a variable-pitch font, we unconditionally
* draw the glyphs one at a time and centre them in their
* character cells (which means in particular that we must
* If we're using a variable-pitch font, we unconditionally
* draw the glyphs one at a time and centre them in their
* character cells (which means in particular that we must
* generally reasonable results.
*/
xoffset = char_width / 2;
SetTextAlign(hdc, TA_TOP | TA_CENTER | TA_NOUPDATECP);
* generally reasonable results.
*/
xoffset = char_width / 2;
SetTextAlign(hdc, TA_TOP | TA_CENTER | TA_NOUPDATECP);
text += len, remaining -= len, x += char_width * len) {
len = (maxlen < remaining ? maxlen : remaining);
text += len, remaining -= len, x += char_width * len) {
len = (maxlen < remaining ? maxlen : remaining);
/* We're using a private area for direct to font. (512 chars.) */
if (ucsdata.dbcs_screenfont && (text[0] & CSET_MASK) == CSET_ACP) {
/* Ho Hum, dbcs fonts are a PITA! */
/* We're using a private area for direct to font. (512 chars.) */
if (ucsdata.dbcs_screenfont && (text[0] & CSET_MASK) == CSET_ACP) {
/* Ho Hum, dbcs fonts are a PITA! */
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
dbcstext, 2, uni_buf+nlen, 1);
mptr++;
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
dbcstext, 2, uni_buf+nlen, 1);
mptr++;
y - font_height * (lattr == LATTR_BOT) + text_adjust,
ETO_CLIPPED | (opaque ? ETO_OPAQUE : 0),
&line_box, uni_buf, nlen,
y - font_height * (lattr == LATTR_BOT) + text_adjust,
ETO_CLIPPED | (opaque ? ETO_OPAQUE : 0),
&line_box, uni_buf, nlen,
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode(hdc, TRANSPARENT);
ExtTextOutW(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode(hdc, TRANSPARENT);
ExtTextOutW(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
- ETO_CLIPPED, &line_box, uni_buf, nlen, IpDxReal);
+ ETO_CLIPPED, &line_box, uni_buf, nlen, lpDx_maybe);
} else if (DIRECT_FONT(text[0])) {
static char *directbuf = NULL;
static int directlen = 0;
} else if (DIRECT_FONT(text[0])) {
static char *directbuf = NULL;
static int directlen = 0;
ExtTextOut(hdc, x + xoffset,
y - font_height * (lattr == LATTR_BOT) + text_adjust,
ETO_CLIPPED | (opaque ? ETO_OPAQUE : 0),
ExtTextOut(hdc, x + xoffset,
y - font_height * (lattr == LATTR_BOT) + text_adjust,
ETO_CLIPPED | (opaque ? ETO_OPAQUE : 0),
- &line_box, directbuf, len, IpDxReal);
+ &line_box, directbuf, len, lpDx_maybe);
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode(hdc, TRANSPARENT);
if (bold_mode == BOLD_SHADOW && (attr & ATTR_BOLD)) {
SetBkMode(hdc, TRANSPARENT);
ExtTextOut(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
ExtTextOut(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
- ETO_CLIPPED, &line_box, directbuf, len, IpDxReal);
+ ETO_CLIPPED, &line_box, directbuf, len, lpDx_maybe);
/* print Glyphs as they are, without Windows' Shaping*/
general_textout(hdc, x + xoffset,
y - font_height * (lattr==LATTR_BOT) + text_adjust,
/* print Glyphs as they are, without Windows' Shaping*/
general_textout(hdc, x + xoffset,
y - font_height * (lattr==LATTR_BOT) + text_adjust,
- &line_box, wbuf, len, IpDx,
+ &line_box, wbuf, len, lpDx,
ExtTextOutW(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
ExtTextOutW(hdc, x + xoffset - 1,
y - font_height * (lattr ==
LATTR_BOT) + text_adjust,
- ETO_CLIPPED, &line_box, wbuf, len, IpDxReal);
+ ETO_CLIPPED, &line_box, wbuf, len, lpDx_maybe);