emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font italic displaying on windows


From: Toru TSUNEYOSHI
Subject: font italic displaying on windows
Date: Tue, 20 Oct 2009 18:17:04 +0900

Hello.

Emacs 23.1.1 on Windows don't display slant italic in some fonts, such
as Japanese "MS Gothic", "MS Mincho", and various fonts.

I wished that Emacs can display slant italic in those fonts, so I made a
very, very, easy patch.
(Maybe it is incomplete and problematic, I think. But it's useful.)

Could someone seek the better solution ?
--- w32font.c.orig      Sat Apr 25 15:11:47 2009
+++ w32font.c   Tue Oct 20 17:45:21 2009
@@ -1131,6 +1131,8 @@
 #define CSB_KOREAN ((1 << 19) | (1 << 21))
 #define CSB_CHINESE ((1 << 18) | (1 << 20))
 
+extern int w32_enable_synthesized_fonts;
+
 static int
 font_matches_spec (type, font, spec, backend, logfont)
      DWORD type;
@@ -1143,6 +1145,7 @@
 
   /* Check italic. Can't check logfonts, since it is a boolean field,
      so there is no difference between "non-italic" and "don't care".  */
+  if (!w32_enable_synthesized_fonts)
   {
     int slant = FONT_SLANT_NUMERIC (spec);
 
@@ -1448,6 +1451,8 @@
                            logical_font->elfFullName)))
     return 1;
 
+  do
+    {
   /* Make a font entity for the font.  */
   entity = w32_enumfont_pattern_entity (match_data->frame, logical_font,
                                        physical_font, font_type,
@@ -1504,6 +1509,11 @@
       /* Add this font to the list.  */
       match_data->list = Fcons (entity, match_data->list);
     }
+    }
+  while (w32_enable_synthesized_fonts
+        && logical_font->elfLogFont.lfItalic == FALSE
+        ? (logical_font->elfLogFont.lfItalic = TRUE, 1)
+        : 0);
   return 1;
 }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]