+
+ /* Try scalable fonts before giving up. */
+ if (nfonts == 0 && NILP (Vscalable_fonts_allowed))
+ {
+ int count = BINDING_STACK_SIZE ();
+ specbind (Qscalable_fonts_allowed, Qt);
+ nfonts = try_alternative_families (f, family, registry, fonts);
+ unbind_to (count, Qnil);
+ }
+ }
+ return nfonts;
+}
+
+
+/* Get a list of matching fonts on frame F.
+
+ FAMILY, if a string, specifies a font family derived from the fontset.
+ It is only used if the face does not specify any family in ATTRS or
+ if we cannot find any font of the face's family.
+
+ REGISTRY, if a string, specifies a font registry and encoding to
+ match. A value of nil means include fonts of any registry and
+ encoding.
+
+ Return in *FONTS a pointer to a vector of font_name structures for
+ the fonts matched. Value is the number of fonts found. */
+
+static int
+try_font_list (f, attrs, family, registry, fonts)
+ struct frame *f;
+ Lisp_Object *attrs;
+ Lisp_Object family, registry;
+ struct font_name **fonts;
+{
+ int nfonts = 0;
+ Lisp_Object face_family = attrs[LFACE_FAMILY_INDEX];
+
+ if (STRINGP (face_family))
+ nfonts = try_alternative_families (f, face_family, registry, fonts);