From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toru TSUNEYOSHI Newsgroups: gmane.emacs.devel Subject: font italic displaying on windows Date: Tue, 20 Oct 2009 18:17:04 +0900 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Oct_20_18_17_04_2009_149)--" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256030603 3188 80.91.229.12 (20 Oct 2009 09:23:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2009 09:23:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 20 11:23:13 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N0AqU-00038R-NL for ged-emacs-devel@m.gmane.org; Tue, 20 Oct 2009 11:17:35 +0200 Original-Received: from localhost ([127.0.0.1]:56903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0AqT-0001Ne-Pe for ged-emacs-devel@m.gmane.org; Tue, 20 Oct 2009 05:17:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0AqL-0001NW-6g for emacs-devel@gnu.org; Tue, 20 Oct 2009 05:17:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0AqG-0001Lx-Bv for emacs-devel@gnu.org; Tue, 20 Oct 2009 05:17:24 -0400 Original-Received: from [199.232.76.173] (port=51913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0AqG-0001Lu-5l for emacs-devel@gnu.org; Tue, 20 Oct 2009 05:17:20 -0400 Original-Received: from blu0-omc4-s7.blu0.hotmail.com ([65.55.111.146]:38228) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0AqF-0005jM-T9 for emacs-devel@gnu.org; Tue, 20 Oct 2009 05:17:20 -0400 Original-Received: from BLU0-SMTP17 ([65.55.111.137]) by blu0-omc4-s7.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Oct 2009 02:17:19 -0700 X-Originating-IP: [124.155.30.210] X-Originating-Email: [t_tuneyosi@hotmail.com] Original-Received: from localhost ([124.155.30.210]) by BLU0-SMTP17.blu0.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Oct 2009 02:17:17 -0700 X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-OriginalArrivalTime: 20 Oct 2009 09:17:17.0935 (UTC) FILETIME=[1ED637F0:01CA5166] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116267 Archived-At: ----Next_Part(Tue_Oct_20_18_17_04_2009_149)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ? ----Next_Part(Tue_Oct_20_18_17_04_2009_149)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="w32font.c.diff" --- 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; } ----Next_Part(Tue_Oct_20_18_17_04_2009_149)----