aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.h
diff options
context:
space:
mode:
authorDmitry Antipov2013-12-12 18:26:06 +0400
committerDmitry Antipov2013-12-12 18:26:06 +0400
commitcf86e18b159f754d6e5537b7b9cbefc32297f7d2 (patch)
treeb584773b90d5cb4c5993cc194037686110a89e36 /src/font.h
parentc4246a6008ef0c69db296df4aab95530f8e2b95e (diff)
downloademacs-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/font.h')
-rw-r--r--src/font.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/font.h b/src/font.h
index 539ebeba52a..7781816860a 100644
--- a/src/font.h
+++ b/src/font.h
@@ -265,6 +265,9 @@ struct font_entity
265{ 265{
266 struct vectorlike_header header; 266 struct vectorlike_header header;
267 Lisp_Object props[FONT_ENTITY_MAX]; 267 Lisp_Object props[FONT_ENTITY_MAX];
268#ifdef HAVE_NS
269 struct font_driver *driver;
270#endif
268}; 271};
269 272
270/* A value which may appear in the member `encoding' of struct font 273/* A value which may appear in the member `encoding' of struct font
@@ -316,6 +319,9 @@ struct font
316 319
317#if defined (HAVE_WINDOW_SYSTEM) 320#if defined (HAVE_WINDOW_SYSTEM)
318 321
322 /* The frame where the font was opened. */
323 struct frame *frame;
324
319 /* Vertical pixel width of the underline. If is zero if that 325 /* Vertical pixel width of the underline. If is zero if that
320 information is not in the font. */ 326 information is not in the font. */
321 int underline_thickness; 327 int underline_thickness;
@@ -735,6 +741,7 @@ extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object);
735 741
736extern Lisp_Object font_make_entity (void); 742extern Lisp_Object font_make_entity (void);
737extern Lisp_Object font_make_object (int, Lisp_Object, int); 743extern Lisp_Object font_make_object (int, Lisp_Object, int);
744extern void font_close_object (Lisp_Object);
738 745
739extern Lisp_Object find_font_encoding (Lisp_Object); 746extern Lisp_Object find_font_encoding (Lisp_Object);
740extern int font_registry_charsets (Lisp_Object, struct charset **, 747extern int font_registry_charsets (Lisp_Object, struct charset **,