diff --git i/src/font.c w/src/font.c index 8027de8..5aada83 100644 --- i/src/font.c +++ w/src/font.c @@ -2585,18 +2585,21 @@ static void font_clear_cache (struct frame *f, Lisp_Object cache, struct font_driver *driver) { Lisp_Object tail, elt; - Lisp_Object tail2, entity; + Lisp_Object entity; + int i; /* CACHE = (DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...) */ for (tail = XCDR (XCDR (cache)); CONSP (tail); tail = XCDR (tail)) { elt = XCAR (tail); - /* elt should have the form (FONT-SPEC FONT-ENTITY ...) */ + /* elt should have the form (FONT-SPEC . [ FONT-ENTITY ...]) */ if (CONSP (elt) && FONT_SPEC_P (XCAR (elt))) { - for (tail2 = XCDR (elt); CONSP (tail2); tail2 = XCDR (tail2)) + elt = XCDR (elt); + eassert (VECTORP (elt)); + for (i = 0; i < ASIZE (elt); i++) { - entity = XCAR (tail2); + entity = AREF (elt, i); if (FONT_ENTITY_P (entity) && EQ (driver->type, AREF (entity, FONT_TYPE_INDEX)))