changeset 40528:7fb50bbb61ad

(w32_to_x_charset): Increase size of XLFD charset buffer. (enum_font_cb2): Ignore fonts with vertical orientation.
author Jason Rumney <jasonr@gnu.org>
date Tue, 30 Oct 2001 22:22:04 +0000
parents 65438689dd69
children ab6d4e4dd152
files src/w32fns.c
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Tue Oct 30 18:41:31 2001 +0000
+++ b/src/w32fns.c	Tue Oct 30 22:22:04 2001 +0000
@@ -5994,7 +5994,7 @@
 w32_to_x_charset (fncharset)
     int fncharset;
 {
-  static char buf[16];
+  static char buf[32];
   Lisp_Object charset_type;
 
   switch (fncharset)
@@ -6141,8 +6141,8 @@
         return buf;
       }
 
-    strncpy(buf, best_match, 15);
-    buf[15] = '\0';
+    strncpy(buf, best_match, 31);
+    buf[31] = '\0';
     return buf;
   }
 }
@@ -6672,13 +6672,16 @@
     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];
@@ -6725,7 +6728,7 @@
 
     /* 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))
@@ -6736,7 +6739,7 @@
       }
   }
 
-  return (1);
+  return 1;
 }
 
 static int CALLBACK