Function: font-family-list

font-family-list is a function defined in font.c.

Signature

(font-family-list &optional FRAME)

Documentation

List available font families on the current frame.

If FRAME is omitted or nil, the selected frame is used.

Probably introduced at or before Emacs version 23.1.

Source Code

// Defined in /usr/src/emacs/src/font.c
{
  struct frame *f = decode_live_frame (frame);
  struct font_driver_list *driver_list;
  Lisp_Object list = Qnil;

  for (driver_list = f->font_driver_list; driver_list;
       driver_list = driver_list->next)
    if (driver_list->driver->list_family)
      {
	Lisp_Object val = driver_list->driver->list_family (f);
	Lisp_Object tail = list;

	for (; CONSP (val); val = XCDR (val))
	  if (NILP (Fmemq (XCAR (val), tail))
	      && SYMBOLP (XCAR (val)))
	    list = Fcons (SYMBOL_NAME (XCAR (val)), list);
      }
  return list;
}