[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xfont.c,v
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/xfont.c,v |
Date: |
Mon, 25 Feb 2008 01:44:27 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/02/25 01:44:27
Index: xfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfont.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- xfont.c 17 Feb 2008 02:03:07 -0000 1.4
+++ xfont.c 25 Feb 2008 01:44:26 -0000 1.5
@@ -775,6 +775,7 @@
XFontStruct *xfont = s->face->font;
int len = to - from;
GC gc = s->gc;
+ int i;
if (gc != s->face->gc)
{
@@ -791,7 +792,6 @@
if (xfont->min_byte1 == 0 && xfont->max_byte1 == 0)
{
char *str;
- int i;
USE_SAFE_ALLOCA;
SAFE_ALLOCA (str, char *, len);
@@ -799,11 +799,25 @@
str[i] = XCHAR2B_BYTE2 (s->char2b + from + i);
BLOCK_INPUT;
if (with_background > 0)
+ {
+ if (s->padding_p)
+ for (i = 0; i < len; i++)
+ XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
+ gc, x + i, y, str + i, 1);
+ else
XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
gc, x, y, str, len);
+ }
+ else
+ {
+ if (s->padding_p)
+ for (i = 0; i < len; i++)
+ XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
+ gc, x + i, y, str + i, 1);
else
XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
gc, x, y, str, len);
+ }
UNBLOCK_INPUT;
SAFE_FREE ();
return s->nchars;
@@ -811,11 +825,25 @@
BLOCK_INPUT;
if (with_background > 0)
+ {
+ if (s->padding_p)
+ for (i = 0; i < len; i++)
+ XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
+ gc, x + i, y, s->char2b + from + i, 1);
+ else
XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
gc, x, y, s->char2b + from, len);
+ }
+ else
+ {
+ if (s->padding_p)
+ for (i = 0; i < len; i++)
+ XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
+ gc, x + i, y, s->char2b + from + i, 1);
else
XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f),
gc, x, y, s->char2b + from, len);
+ }
UNBLOCK_INPUT;
return len;