- SCM key = gh_cons (fn, gh_double2scm (m));
- SCM met = scm_assoc (key, scaled_fonts_);
-
- if (gh_pair_p (met))
- return unsmob_metrics (ly_cdr (met));
-
- /*
- Hmm. We're chaining font - metrics. Should consider wether to merge
- virtual-font and scaled_font.
- */
- Font_metric* f=0;
- if (gh_list_p (fn))
- {
- f = new Virtual_font_metric (fn, m, this); // TODO: GC protection.
-
- scaled_fonts_ = scm_acons (key, f->self_scm (), scaled_fonts_);
- scm_gc_unprotect_object (f->self_scm ());
- }
- else
- {
- SCM scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));