diff options
| author | Dmitry Antipov | 2013-12-12 18:26:06 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-12-12 18:26:06 +0400 |
| commit | cf86e18b159f754d6e5537b7b9cbefc32297f7d2 (patch) | |
| tree | b584773b90d5cb4c5993cc194037686110a89e36 /src/ftfont.c | |
| parent | c4246a6008ef0c69db296df4aab95530f8e2b95e (diff) | |
| download | emacs-cf86e18b159f754d6e5537b7b9cbefc32297f7d2.tar.gz emacs-cf86e18b159f754d6e5537b7b9cbefc32297f7d2.zip | |
* font.h (struct font_entity) [HAVE_NS]: New field to record
font driver which was used to create this entity.
(struct font) [HAVE_WINDOW_SYSTEM]: New field to record
frame where the font was opened.
(font_close_object): Add prototype.
* font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
(font_close_object): Not static any more. Lost frame arg.
Adjust comment and users.
* alloc.c (cleanup_vector): Call font_close_object to adjust
per-frame font counters correctly. If HAVE_NS, also call
driver-specific cleanup for font-entity objects.
* ftfont.c (ftfont_open):
* nsfont.m (nsfont_open):
* w32font.c (w32font_open_internal):
* xfont.c (xfont_open):
* xftfont.c (xftfont_open): Save frame pointer in font object.
* macfont.m (macfont_open): Likewise.
(macfont_descriptor_entity): Save driver pointer to be able
to call its free_entity routine when font-entity is swept.
* ftxfont.c (ftxfont_open): Add eassert because frame
pointer should be saved by ftfont_driver.open.
Diffstat (limited to 'src/ftfont.c')
| -rw-r--r-- | src/ftfont.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 6a2303ab4a7..36780454257 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -1236,6 +1236,7 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) | |||
| 1236 | ASET (font_object, FONT_FILE_INDEX, filename); | 1236 | ASET (font_object, FONT_FILE_INDEX, filename); |
| 1237 | ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (NULL, filename)); | 1237 | ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (NULL, filename)); |
| 1238 | font = XFONT_OBJECT (font_object); | 1238 | font = XFONT_OBJECT (font_object); |
| 1239 | font->frame = f; | ||
| 1239 | ftfont_info = (struct ftfont_info *) font; | 1240 | ftfont_info = (struct ftfont_info *) font; |
| 1240 | ftfont_info->ft_size = ft_face->size; | 1241 | ftfont_info->ft_size = ft_face->size; |
| 1241 | ftfont_info->index = XINT (idx); | 1242 | ftfont_info->index = XINT (idx); |