- SCM shape = SCM_BOOL_F;
- SCM family = SCM_BOOL_F;
- SCM series = SCM_BOOL_F;
-
-
- SCM point_sz = ly_assoc_chain (design_sz_sym, alist_chain);
- SCM rel_sz = SCM_BOOL_F;
-
- shape = ly_assoc_chain (shape_sym, alist_chain);
- family = ly_assoc_chain (family_sym, alist_chain);
- series = ly_assoc_chain (series_sym, alist_chain);
-
- if (gh_pair_p (shape))
- shape = ly_cdr (shape);
- if (gh_pair_p (family))
- family = ly_cdr (family);
- if (gh_pair_p (series))
- series = ly_cdr (series);
-
-
- if (gh_pair_p (point_sz))
- point_sz = ly_cdr (point_sz);
- else
- {
- rel_sz = ly_assoc_chain (rel_sz_sym, alist_chain);
- if (gh_pair_p (rel_sz))
- rel_sz = ly_cdr (rel_sz);
- }
-
- for (SCM s = fonts ; gh_pair_p (s); s = ly_cdr (s))
- {
- SCM qlist = ly_caar (s);
-
- if (!wild_compare (scm_list_ref (qlist, gh_int2scm (1)), series))
- continue;
- if (!wild_compare (scm_list_ref (qlist, gh_int2scm (2)), shape))
- continue;
- if (!wild_compare (scm_list_ref (qlist, gh_int2scm (3)), family))
- continue;
-
- if (point_sz == SCM_BOOL_F && !wild_compare (ly_car (qlist), rel_sz))
- continue;
-
- SCM qname = ly_cdar (s);
- return qname;
- }
-
- warning (_ ("couldn't find any font satisfying "));
- scm_write (scm_list_n (point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
- scm_flush (scm_current_error_port ());
-
- return ly_str02scm ("cmr10");
-