diff options
| author | Dmitry Antipov | 2013-12-13 19:55:23 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-12-13 19:55:23 +0400 |
| commit | 5035fbc19e2f569674237c61e6ffdd4719e092d5 (patch) | |
| tree | 86e7b51ececff332f6bd3bebd92f389cc4024ce8 /src/font.c | |
| parent | b6c888cc7afed65f24c023b8e90b73649f438e14 (diff) | |
| download | emacs-5035fbc19e2f569674237c61e6ffdd4719e092d5.tar.gz emacs-5035fbc19e2f569674237c61e6ffdd4719e092d5.zip | |
* alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
* nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
2013-12-12 font-related change to avoid Bug#16128, which
is quite hard to fix without even more substantial changes.
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/font.c b/src/font.c index 9f284440143..fb56b3d3fb3 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -173,9 +173,6 @@ font_make_entity (void) | |||
| 173 | allocate_pseudovector (VECSIZE (struct font_entity), | 173 | allocate_pseudovector (VECSIZE (struct font_entity), |
| 174 | FONT_ENTITY_MAX, PVEC_FONT)); | 174 | FONT_ENTITY_MAX, PVEC_FONT)); |
| 175 | XSETFONT (font_entity, entity); | 175 | XSETFONT (font_entity, entity); |
| 176 | #ifdef HAVE_NS | ||
| 177 | entity->driver = NULL; | ||
| 178 | #endif | ||
| 179 | return font_entity; | 176 | return font_entity; |
| 180 | } | 177 | } |
| 181 | 178 | ||
| @@ -2884,10 +2881,10 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size) | |||
| 2884 | } | 2881 | } |
| 2885 | 2882 | ||
| 2886 | 2883 | ||
| 2887 | /* Close FONT_OBJECT. */ | 2884 | /* Close FONT_OBJECT that is opened on frame F. */ |
| 2888 | 2885 | ||
| 2889 | void | 2886 | static void |
| 2890 | font_close_object (Lisp_Object font_object) | 2887 | font_close_object (struct frame *f, Lisp_Object font_object) |
| 2891 | { | 2888 | { |
| 2892 | struct font *font = XFONT_OBJECT (font_object); | 2889 | struct font *font = XFONT_OBJECT (font_object); |
| 2893 | 2890 | ||
| @@ -2897,13 +2894,8 @@ font_close_object (Lisp_Object font_object) | |||
| 2897 | FONT_ADD_LOG ("close", font_object, Qnil); | 2894 | FONT_ADD_LOG ("close", font_object, Qnil); |
| 2898 | font->driver->close (font); | 2895 | font->driver->close (font); |
| 2899 | #ifdef HAVE_WINDOW_SYSTEM | 2896 | #ifdef HAVE_WINDOW_SYSTEM |
| 2900 | eassert (font->frame); | 2897 | eassert (FRAME_DISPLAY_INFO (f)->n_fonts); |
| 2901 | /* If the frame is gone, we can't do anything (Bug#16128). */ | 2898 | FRAME_DISPLAY_INFO (f)->n_fonts--; |
| 2902 | if (FRAME_LIVE_P (font->frame)) | ||
| 2903 | { | ||
| 2904 | eassert (FRAME_DISPLAY_INFO (font->frame)->n_fonts); | ||
| 2905 | FRAME_DISPLAY_INFO (font->frame)->n_fonts--; | ||
| 2906 | } | ||
| 2907 | #endif | 2899 | #endif |
| 2908 | } | 2900 | } |
| 2909 | 2901 | ||
| @@ -4556,11 +4548,11 @@ DEFUN ("open-font", Fopen_font, Sopen_font, 1, 3, 0, | |||
| 4556 | } | 4548 | } |
| 4557 | 4549 | ||
| 4558 | DEFUN ("close-font", Fclose_font, Sclose_font, 1, 2, 0, | 4550 | DEFUN ("close-font", Fclose_font, Sclose_font, 1, 2, 0, |
| 4559 | doc: /* Close FONT-OBJECT. Optional FRAME is unused. */) | 4551 | doc: /* Close FONT-OBJECT. */) |
| 4560 | (Lisp_Object font_object, Lisp_Object frame) | 4552 | (Lisp_Object font_object, Lisp_Object frame) |
| 4561 | { | 4553 | { |
| 4562 | CHECK_FONT_OBJECT (font_object); | 4554 | CHECK_FONT_OBJECT (font_object); |
| 4563 | font_close_object (font_object); | 4555 | font_close_object (decode_live_frame (frame), font_object); |
| 4564 | return Qnil; | 4556 | return Qnil; |
| 4565 | } | 4557 | } |
| 4566 | 4558 | ||
| @@ -4895,7 +4887,7 @@ If the named font is not yet loaded, return nil. */) | |||
| 4895 | /* As font_object is still in FONT_OBJLIST of the entity, we can't | 4887 | /* As font_object is still in FONT_OBJLIST of the entity, we can't |
| 4896 | close it now. Perhaps, we should manage font-objects | 4888 | close it now. Perhaps, we should manage font-objects |
| 4897 | by `reference-count'. */ | 4889 | by `reference-count'. */ |
| 4898 | font_close_object (font_object); | 4890 | font_close_object (f, font_object); |
| 4899 | #endif | 4891 | #endif |
| 4900 | return info; | 4892 | return info; |
| 4901 | } | 4893 | } |