aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2001-10-30 22:26:40 +0000
committerJason Rumney2001-10-30 22:26:40 +0000
commit5e905a57375bfb8b1579c3404d40554adb2d7a9d (patch)
treef1acdf1aca6171d8c7dc1dfeb6badd6807f8fefa /src
parent27c4f6c0213d84176894afb198fa4e4a93e61de4 (diff)
downloademacs-5e905a57375bfb8b1579c3404d40554adb2d7a9d.tar.gz
emacs-5e905a57375bfb8b1579c3404d40554adb2d7a9d.zip
(w32_to_x_charset): Increase size of XLFD charset buffer.
(enum_font_cb2): Ignore fonts with vertical orientation.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32fns.c21
2 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5c5bfa4766f..885b230f29b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12001-10-30 Jason Rumney <jasonr@gnu.org>
2
3 * w32fns.c (w32_to_x_charset): Increase size of XLFD charset buffer.
4 (enum_font_cb2): Ignore fonts with vertical orientation.
5
12001-10-30 Richard M. Stallman <rms@gnu.org> 62001-10-30 Richard M. Stallman <rms@gnu.org>
2 7
3 * keyboard.c (Finput_pending_p): Doc fix. 8 * keyboard.c (Finput_pending_p): Doc fix.
diff --git a/src/w32fns.c b/src/w32fns.c
index 55af56303eb..0c7f94fed89 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5994,7 +5994,7 @@ static char *
5994w32_to_x_charset (fncharset) 5994w32_to_x_charset (fncharset)
5995 int fncharset; 5995 int fncharset;
5996{ 5996{
5997 static char buf[16]; 5997 static char buf[32];
5998 Lisp_Object charset_type; 5998 Lisp_Object charset_type;
5999 5999
6000 switch (fncharset) 6000 switch (fncharset)
@@ -6141,8 +6141,8 @@ w32_to_x_charset (fncharset)
6141 return buf; 6141 return buf;
6142 } 6142 }
6143 6143
6144 strncpy(buf, best_match, 15); 6144 strncpy(buf, best_match, 31);
6145 buf[15] = '\0'; 6145 buf[31] = '\0';
6146 return buf; 6146 return buf;
6147 } 6147 }
6148} 6148}
@@ -6672,13 +6672,16 @@ enum_font_cb2 (lplf, lptm, FontType, lpef)
6672 int FontType; 6672 int FontType;
6673 enumfont_t * lpef; 6673 enumfont_t * lpef;
6674{ 6674{
6675 if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline) 6675 /* Ignore struck out, underlined and vertical versions of fonts. */
6676 return (1); 6676 if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline
6677 6677 || lplf->elfLogFont.lfEscapement != 0
6678 || lplf->elfLogFont.lfOrientation != 0)
6679 return 1;
6680
6678 /* Check that the character set matches if it was specified */ 6681 /* Check that the character set matches if it was specified */
6679 if (lpef->logfont.lfCharSet != DEFAULT_CHARSET && 6682 if (lpef->logfont.lfCharSet != DEFAULT_CHARSET &&
6680 lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet) 6683 lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet)
6681 return (1); 6684 return 1;
6682 6685
6683 { 6686 {
6684 char buf[100]; 6687 char buf[100];
@@ -6725,7 +6728,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef)
6725 6728
6726 /* TODO: List all relevant charsets if charset not specified. */ 6729 /* TODO: List all relevant charsets if charset not specified. */
6727 if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset)) 6730 if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset))
6728 return (0); 6731 return 0;
6729 6732
6730 if (NILP (*(lpef->pattern)) 6733 if (NILP (*(lpef->pattern))
6731 || w32_font_match (buf, XSTRING (*(lpef->pattern))->data)) 6734 || w32_font_match (buf, XSTRING (*(lpef->pattern))->data))
@@ -6736,7 +6739,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef)
6736 } 6739 }
6737 } 6740 }
6738 6741
6739 return (1); 6742 return 1;
6740} 6743}
6741 6744
6742static int CALLBACK 6745static int CALLBACK