[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32fns.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32fns.c [emacs-unicode-2] |
Date: |
Sat, 04 Sep 2004 05:43:56 -0400 |
Index: emacs/src/w32fns.c
diff -c emacs/src/w32fns.c:1.219.2.8 emacs/src/w32fns.c:1.219.2.9
*** emacs/src/w32fns.c:1.219.2.8 Wed Sep 1 21:20:10 2004
--- emacs/src/w32fns.c Sat Sep 4 09:14:27 2004
***************
*** 4644,4649 ****
--- 4644,4650 ----
{
Lisp_Object bdf_fonts;
struct font_info *retval = NULL;
+ struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
bdf_fonts = w32_list_bdf_fonts (build_string (fontname), 1);
***************
*** 4651,4661 ****
--- 4652,4673 ----
{
char *bdf_name, *bdf_file;
Lisp_Object bdf_pair;
+ int i;
bdf_name = SDATA (XCAR (bdf_fonts));
bdf_pair = Fassoc (XCAR (bdf_fonts), Vw32_bdf_filename_alist);
bdf_file = SDATA (XCDR (bdf_pair));
+ // If the font is already loaded, do not load it again.
+ for (i = 0; i < dpyinfo->n_fonts; i++)
+ {
+ if ((dpyinfo->font_table[i].name
+ && !strcmp (dpyinfo->font_table[i].name, bdf_name))
+ || (dpyinfo->font_table[i].full_name
+ && !strcmp (dpyinfo->font_table[i].full_name, bdf_name)))
+ return dpyinfo->font_table + i;
+ }
+
retval = w32_load_bdf_font (f, bdf_name, size, bdf_file);
bdf_fonts = XCDR (bdf_fonts);