From: Toru TSUNEYOSHI <t_tuneyosi@hotmail.com>
To: emacs-devel@gnu.org
Subject: font italic displaying on windows
Date: Tue, 20 Oct 2009 18:17:04 +0900 [thread overview]
Message-ID: <BLU0-SMTP172CCA6398DE32B0FC7332E2C00@phx.gbl> (raw)
[-- 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;
}
next reply other threads:[~2009-10-20 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 9:17 Toru TSUNEYOSHI [this message]
2009-10-21 0:27 ` font italic displaying on windows Jason Rumney
2009-10-22 10:09 ` Toru TSUNEYOSHI
2009-10-22 10:50 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLU0-SMTP172CCA6398DE32B0FC7332E2C00@phx.gbl \
--to=t_tuneyosi@hotmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).