From: Patrick McCarty Date: Mon, 7 Sep 2009 08:23:26 +0000 (-0700) Subject: Fix check for `utf-8-string' in output modules X-Git-Tag: release/2.13.4-1~59 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f29f941793df7e4ef047e73d04f47ebc428c775e;p=lilypond.git Fix check for `utf-8-string' in output modules When checking for `utf-8-string', we must not include the "warning" definitions (set at runtime) for backends without `utf-8-string'. An additional check is therefore necessary in order to ignore module variables bound to lambda expressions. All of the stencil expression procedures defined in output-*.scm create variable<->symbol bindings, and has_utf8_string should be true in these cases. But the variable<->#f bindings should not count, because they are set at runtime. This commit adds an additional check to disclude the variable<->#f bindings. --- diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 14ceadf438..b32a770049 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -356,7 +356,12 @@ Pango_font::text_stencil (string str, if (ly_is_module (mod)) { SCM utf8_string = ly_module_lookup (mod, ly_symbol2scm ("utf-8-string")); - if (utf8_string != SCM_BOOL_F) + /* + has_utf8_string should only be true when utf8_string is a + variable that is bound to a *named* procedure. + */ + if (utf8_string != SCM_BOOL_F + && scm_procedure_name (SCM_VARIABLE_REF (utf8_string)) != SCM_BOOL_F) has_utf8_string = true; }