if (! plist)
mdebug_hook ();
mplist_pop (plist);
+ if (MPLIST_TAIL_P (fontset_list))
+ {
+ M17N_OBJECT_UNREF (fontset_list);
+ fontset_list = NULL;
+ }
free (object);
}
void
mfont__fontset_fini ()
{
- while (! MPLIST_TAIL_P (fontset_list))
- free_fontset ((MFontset *) MPLIST_VAL (fontset_list));
- M17N_OBJECT_UNREF (fontset_list);
- fontset_list = NULL;
+ M17N_OBJECT_UNREF (default_fontset);
+ default_fontset = NULL;
}
if (fontset->mdb)
load_fontset_contents (fontset);
+ MFONT_INIT (&request);
mfont__set_spec_from_face (&request, face);
if (request.size <= 0)
{
MFontset *fontset;
if (! name)
- fontset = default_fontset;
+ {
+ fontset = default_fontset;
+ M17N_OBJECT_REF (fontset);
+ }
else
{
sym = msymbol (name);
fontset = mplist_get (fontset_list, sym);
- if (! fontset)
+ if (fontset)
+ M17N_OBJECT_REF (fontset);
+ else
{
M17N_OBJECT (fontset, free_fontset, MERROR_FONTSET);
fontset->name = sym;
mplist_put (fontset_list, sym, fontset);
}
}
- M17N_OBJECT_REF (fontset);
return fontset;
}
}
mplist_put (fontset_list, sym, copy);
- M17N_OBJECT_REF (copy);
return copy;
}