From 04eee89a9f2ab21c39d7452c9b01cca22d941395 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 30 Oct 2001 22:36:15 +0000 Subject: [PATCH] (w32_to_x_charset): Increase size of XLFD charset buffer. (enum_font_cb2): Ignore fonts with vertical orientation. --- src/ChangeLog | 5 +++++ src/w32fns.c | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 29b79aa0807..7384d40bca0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-10-30 Jason Rumney + + * w32fns.c (w32_to_x_charset): Increase size of XLFD charset buffer. + (enum_font_cb2): Ignore fonts with vertical orientation. + 2001-10-30 Gerd Moellmann * xterm.c (x_after_update_window_line): Don't run the code diff --git a/src/w32fns.c b/src/w32fns.c index d9a23aa4031..b490bd86290 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5946,7 +5946,7 @@ static char * w32_to_x_charset (fncharset) int fncharset; { - static char buf[16]; + static char buf[32]; Lisp_Object charset_type; switch (fncharset) @@ -6093,8 +6093,8 @@ w32_to_x_charset (fncharset) return buf; } - strncpy(buf, best_match, 15); - buf[15] = '\0'; + strncpy(buf, best_match, 31); + buf[31] = '\0'; return buf; } } @@ -6624,13 +6624,16 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) int FontType; enumfont_t * lpef; { - if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline) - return (1); + /* Ignore struck out, underlined and vertical versions of fonts. */ + if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline + || lplf->elfLogFont.lfEscapement != 0 + || lplf->elfLogFont.lfOrientation != 0) + return 1; /* Check that the character set matches if it was specified */ if (lpef->logfont.lfCharSet != DEFAULT_CHARSET && lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet) - return (1); + return 1; { char buf[100]; @@ -6677,7 +6680,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) /* TODO: List all relevant charsets if charset not specified. */ if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset)) - return (0); + return 0; if (NILP (*(lpef->pattern)) || w32_font_match (buf, XSTRING (*(lpef->pattern))->data)) @@ -6688,7 +6691,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) } } - return (1); + return 1; } static int CALLBACK -- 2.39.2