From f29f941793df7e4ef047e73d04f47ebc428c775e Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 7 Sep 2009 01:23:26 -0700 Subject: [PATCH] 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. --- lily/pango-font.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.5