* 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
* Re: font italic displaying on windows
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
0 siblings, 2 replies; 4+ messages in thread
From: Jason Rumney @ 2009-10-21 0:27 UTC (permalink / raw)
To: Toru TSUNEYOSHI; +Cc: emacs-devel
Toru TSUNEYOSHI wrote:
+extern int w32_enable_synthesized_fonts;
The whole definition and initialization of this variable should be moved to w32font.c, as it is not used elsewhere.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: font italic displaying on windows
2009-10-21 0:27 ` Jason Rumney
@ 2009-10-22 10:09 ` Toru TSUNEYOSHI
2009-10-22 10:50 ` Juanma Barranquero
1 sibling, 0 replies; 4+ messages in thread
From: Toru TSUNEYOSHI @ 2009-10-22 10:09 UTC (permalink / raw)
To: jasonr; +Cc: emacs-devel
> Toru TSUNEYOSHI wrote:
>
> +extern int w32_enable_synthesized_fonts;
>
> The whole definition and initialization of this variable should be moved
> to w32font.c, as it is not used elsewhere.
I also think so.
(If it is suitable, I wish someone deals with it.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: font italic displaying on windows
2009-10-21 0:27 ` Jason Rumney
2009-10-22 10:09 ` Toru TSUNEYOSHI
@ 2009-10-22 10:50 ` Juanma Barranquero
1 sibling, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2009-10-22 10:50 UTC (permalink / raw)
To: Jason Rumney; +Cc: Toru TSUNEYOSHI, emacs-devel
On Wed, Oct 21, 2009 at 02:27, Jason Rumney <jasonr@gnu.org> wrote:
> Toru TSUNEYOSHI wrote:
>
> +extern int w32_enable_synthesized_fonts;
>
> The whole definition and initialization of this variable should be moved to
> w32font.c, as it is not used elsewhere.
Unless Tsuneyoshi-san's patch (or similar) is accepted,
w32_enable_synthesized_fonts is in fact not used anywhere...
Juanma
^ 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 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).