all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font italic displaying on windows
@ 2009-10-20  9:17 Toru TSUNEYOSHI
  2009-10-21  0:27 ` Jason Rumney
  0 siblings, 1 reply; 4+ messages in thread
From: Toru TSUNEYOSHI @ 2009-10-20  9:17 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: Text/Plain, Size: 344 bytes --]

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 ?

[-- Attachment #2: w32font.c.diff --]
[-- Type: Text/X-Patch, Size: 1127 bytes --]

--- 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;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-22 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20  9:17 font italic displaying on windows Toru TSUNEYOSHI
2009-10-21  0:27 ` Jason Rumney
2009-10-22 10:09   ` Toru TSUNEYOSHI
2009-10-22 10:50   ` Juanma Barranquero

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.