- SCM exp
- = scm_list_3 (ly_symbol2scm ("utf-8-string"),
- ly_string2scm (description_string ()),
- ly_string2scm (str));
+ if (utf8_string != SCM_BOOL_F
+ && scm_procedure_name (SCM_VARIABLE_REF (utf8_string)) != SCM_BOOL_F)
+ has_utf8_string = true;
+ }
+
+ /*
+ The SVG backend only uses utf-8-string for the non-music
+ fonts, hence the check here. --pmccarty
+
+ TODO: use a program option (-dmusic-strings-to-paths) here
+ instead that is enabled only when -dbackend=svg.
+ */
+ if ((name == "svg" && !feta) || (name != "svg" && has_utf8_string))
+ {
+ // For Pango based backends, we take a shortcut.
+ SCM exp = scm_list_3 (ly_symbol2scm ("utf-8-string"),
+ ly_string2scm (description_string ()),
+ ly_string2scm (str));