]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_to_x_charset): Increase size of XLFD charset buffer.
authorJason Rumney <jasonr@gnu.org>
Tue, 30 Oct 2001 22:26:40 +0000 (22:26 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 30 Oct 2001 22:26:40 +0000 (22:26 +0000)
(enum_font_cb2): Ignore fonts with vertical orientation.

src/ChangeLog
src/w32fns.c

index 5c5bfa4766f3c5e07015283148a61cc948c01110..885b230f29bd3ba9b195f543c07c7ff78eab4038 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-30  Jason Rumney  <jasonr@gnu.org>
+
+       * w32fns.c (w32_to_x_charset): Increase size of XLFD charset buffer.
+       (enum_font_cb2): Ignore fonts with vertical orientation.
+
 2001-10-30  Richard M. Stallman  <rms@gnu.org>
 
        * keyboard.c (Finput_pending_p): Doc fix.
index 55af56303ebcda4f6feea807ac44f1e882528b37..0c7f94fed89369e80e0257c774588c722240e677 100644 (file)
@@ -5994,7 +5994,7 @@ static char *
 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 @@ 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;
   }
 }
@@ -6672,13 +6672,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];
@@ -6725,7 +6728,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))
@@ -6736,7 +6739,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef)
       }
   }
 
-  return (1);
+  return 1;
 }
 
 static int CALLBACK