/* Macros to access special values of (realized) FONTSET. */
#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2]
#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3]
+#define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4]
#define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5]
#define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6]
#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7]
FONT_ENTITY_SET_NOT_LOADABLE (font_entity);
continue;
}
+ FONTSET_OBJLIST (fontset)
+ = Fcons (font_object, FONTSET_OBJLIST (fontset));
ASET (elt, 3, font_object);
if (has_char < 0)
{
return elt;
}
+void
+free_realized_fontset (f, fontset)
+ FRAME_PTR f;
+ Lisp_Object fontset;
+{
+ int i;
+ Lisp_Object tail;
+
+ return;
+ for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
+ {
+ xassert (FONT_OBJECT_P (XCAR (tail)));
+ font_close_object (f, XCAR (tail));
+ }
+}
/* Free fontset of FACE defined on frame F. Called from
free_realized_face. */
fontset = FONTSET_FROM_ID (face->fontset);
xassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
xassert (f == XFRAME (FONTSET_FRAME (fontset)));
+ free_realized_fontset (f, fontset);
ASET (Vfontset_table, face->fontset, Qnil);
if (face->fontset < next_fontset_id)
next_fontset_id = face->fontset;
fontset = AREF (Vfontset_table, id);
xassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
xassert (f == XFRAME (FONTSET_FRAME (fontset)));
+ free_realized_fontset (f, fontset);
ASET (Vfontset_table, id, Qnil);
if (id < next_fontset_id)
next_fontset_id = face->fontset;
XVECTOR (info)->contents[6] = make_number (fontp->default_ascent);
#ifdef USE_FONT_BACKEND
- if (! NILP (font_object))
+ if (enable_font_backend && ! NILP (font_object))
font_close_object (f, font_object);
#endif /* USE_FONT_BACKEND */
return info;