- SCM name = ly_assoc_chain (name_sym, alist_chain);
-
- SCM shape = SCM_BOOL_F;
- SCM family = SCM_BOOL_F;
- SCM series = SCM_BOOL_F;
-
-
- SCM point_sz = ly_assoc_chain (pt_sz_sym, alist_chain);
- SCM rel_sz = SCM_BOOL_F;
-
- if (!gh_pair_p (name))
- {
- 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 = gh_cdr (shape);
- if (gh_pair_p (family))
- family = gh_cdr (family);
- if (gh_pair_p (series))
- series = gh_cdr (series);
- }
- else
- name = gh_cdr (name);
-
-
- if (gh_pair_p (point_sz))
- point_sz = gh_cdr (point_sz);
- else
- {
- rel_sz = ly_assoc_chain (rel_sz_sym, alist_chain);
- if (gh_pair_p (rel_sz))
- rel_sz = gh_cdr (rel_sz);
- }
-
- for (SCM s = fonts ; gh_pair_p (s); s = gh_cdr (s))
- {
- SCM qlist = gh_caar (s);
-
- if (name != SCM_BOOL_F)
- {
- if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name))
- continue;
- }
- else
- {
- 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)
- {
- // This if statement will always be true since name must
- // be SCM_BOOL_F here, right? /MB
- if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name))
- continue;
- }
- else
- {
- if (!wild_compare(gh_car (qlist), rel_sz))
- continue;
- }
-
-
- SCM qname = gh_cdar (s);
- return qname;
- }
-
- warning (_("couldn't find any font satisfying ") );
- scm_write (gh_list (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
- scm_flush(scm_current_error_port ());
-
- return ly_str02scm ("cmr10");
-