- SCM scale_var = SCM_EOL;
- Real lookup_mag = m;
- if (!dynamic_cast<Virtual_font_metric*> (f))
- {
- scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));
- lookup_mag /= ly_scm2double (scm_variable_ref (scale_var));
- }
-
- SCM sizes = scm_hashq_ref (scaled_fonts_, f->self_scm (), SCM_BOOL_F);
- if (sizes != SCM_BOOL_F)
- {
- SCM met = scm_assoc (scm_make_real (lookup_mag), sizes);
- if (ly_c_pair_p (met))
- return unsmob_metrics (ly_cdr (met));
- }
- else
- sizes = SCM_EOL;
-
- /* Hmm. We're chaining font - metrics. Should consider whether to
- merge virtual-font and scaled_font. */
- SCM val = SCM_EOL;
- if (Virtual_font_metric * vf = dynamic_cast<Virtual_font_metric*> (f))
- {
- /*
- For fontify_atom (), the magnification and name must be known
- at the same time. That's impossible for
-
- Scaled (Virtual_font (Font1,Font2))
-
- so we replace by
-
- Virtual_font (Scaled (Font1), Scaled (Font2))
-
- */
-
- SCM lst = SCM_EOL;
- SCM *t = &lst;
- for (SCM s = vf->get_font_list (); ly_c_pair_p (s); s = ly_cdr (s))
- {
- Font_metric *scaled = find_scaled_font (unsmob_metrics (ly_car (s)),
- m, input_enc_name);
- *t = scm_cons (scaled->self_scm (), SCM_EOL);
- t = SCM_CDRLOC(*t);
- }
-
- vf = new Virtual_font_metric (lst);
- val = vf->self_scm ();
- }
- else
- {