Wed Jul 5 19:48:10 PDT 2000 Michael Jennings <mej@eterm.org>

The multibyte font size patches caused weird behavior if your
	multibyte font sizes didn't match your regular font sizes for those
	who don't actually use the multibyte support.  So I fixed that.  I
	also fixed the XA_TEXT problem for people using old/broken X.


SVN revision: 2904
This commit is contained in:
Michael Jennings 2000-07-06 02:32:08 +00:00
parent 9648bcd0a0
commit d5b5f49ae8
5 changed files with 24 additions and 12 deletions

View File

@ -3763,3 +3763,11 @@ Wed Jul 5 18:31:39 PDT 2000 Michael Jennings <mej@eterm.org>
Imlib2.h works again.
-------------------------------------------------------------------------------
Wed Jul 5 19:48:10 PDT 2000 Michael Jennings <mej@eterm.org>
The multibyte font size patches caused weird behavior if your
multibyte font sizes didn't match your regular font sizes for those
who don't actually use the multibyte support. So I fixed that. I
also fixed the XA_TEXT problem for people using old/broken X.
-------------------------------------------------------------------------------

View File

@ -2409,7 +2409,7 @@ cmd_getc(void)
/* characters already read in */
if (CHARS_READ()) {
RETURN_CHAR();
} else if (paused == 1) {
} else if (paused == 1 && cmd_fd == -1) {
const char *done = " -- Task Finished, ESC to exit";
append_to_title(done);

View File

@ -429,9 +429,9 @@ change_font(int init, const char *fontname)
fw = TermWin.font->min_bounds.width;
#ifdef MULTI_CHARSET
fh = (MAX(TermWin.font->ascent, TermWin.mfont->ascent)
+ MAX(TermWin.font->descent, TermWin.mfont->descent)
+ rs_line_space);
fh = (MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent)
+ MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->descent), TermWin.font->descent)
+ rs_line_space);
#else
fh = TermWin.font->ascent + TermWin.font->descent + rs_line_space;
#endif

View File

@ -94,13 +94,11 @@ unsigned char refresh_all = 0;
#ifdef MULTI_CHARSET
static short multi_byte = 0;
static enum {
EUCJ, EUCKR = EUCJ, GB = EUCJ, SJIS, BIG5, LATIN1
} encoding_method = LATIN1;
static short lost_multi = 0;
static enum {
SBYTE, WBYTE
} chstat = SBYTE;
static short lost_multi = 0;
encoding_t encoding_method = LATIN1;
#define RESET_CHSTAT if (chstat == WBYTE) chstat = SBYTE, lost_multi = 1
#else
@ -1897,8 +1895,8 @@ scr_refresh(int type)
#endif
#ifdef MULTI_CHARSET
ascent = MAX(TermWin.mfont->ascent, TermWin.font->ascent);
descent = MAX(TermWin.mfont->descent, TermWin.font->descent);
ascent = MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent);
descent = MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->descent), TermWin.font->descent);
#else
ascent = TermWin.font->ascent;
descent = TermWin.font->descent;
@ -3212,7 +3210,7 @@ selection_send(XSelectionRequestEvent * rq)
(unsigned char *) target_list,
(sizeof(target_list) / sizeof(target_list[0])));
ev.xselection.property = rq->property;
#ifdef MULTI_CHARSET
#if defined(MULTI_CHARSET) && defined(HAVE_X11_XMU_ATOMS_H)
} else if (rq->target == XA_STRING || rq->target == XA_TEXT(Xdisplay) || rq->target == XA_COMPOUND_TEXT(Xdisplay)) {
XTextProperty xtextp;
char *l[1];
@ -3325,7 +3323,7 @@ void xim_get_position(XPoint *pos)
}
pos->y = (Height2Pixel(screen.row)
# ifdef MULTI_CHARSET
+ MAX(TermWin.mfont->ascent, TermWin.font->ascent)
+ MAX((encoding_method == LATIN1 ? 0 : TermWin.mfont->ascent), TermWin.font->ascent)
# else
+ TermWin.font->ascent
# endif

View File

@ -160,6 +160,9 @@ typedef enum {
SELECTION_CONT,
SELECTION_DONE
} selection_op_t;
typedef enum {
LATIN1 = 0, EUCJ, EUCKR = EUCJ, GB = EUCJ, SJIS, BIG5
} encoding_t;
typedef struct {
short row, col;
} row_col_t;
@ -224,6 +227,9 @@ typedef struct {
extern unsigned int colorfgbg;
#endif
extern unsigned char refresh_all;
#ifdef MULTI_CHARSET
extern encoding_t encoding_method;
#endif
/************ Function Prototypes ************/
_XFUNCPROTOBEGIN