]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix check for `utf-8-string' in output modules
authorPatrick McCarty <pnorcks@gmail.com>
Mon, 7 Sep 2009 08:23:26 +0000 (01:23 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Mon, 7 Sep 2009 19:08:42 +0000 (12:08 -0700)
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

index 14ceadf438a530c5e851e5754164b1ee1918d218..b32a77004951573311a4473012f3ebe21af28bbe 100644 (file)
@@ -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;
     }