X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffont-interface.cc;h=9bd109545839de586198784106bd333585c0cf9e;hb=2b76c312e340cdbb9c164a6d354d98251312c613;hp=c9400629ae49589d88c0cc2d8a88ba0350611366;hpb=36f6cd546770e38c6e2314404e21f1c89504eb7d;p=lilypond.git diff --git a/lily/font-interface.cc b/lily/font-interface.cc index c9400629ae..9bd1095458 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2000--2005 Han-Wen Nienhuys + (c) 2000--2009 Han-Wen Nienhuys */ #include "font-interface.hh" @@ -22,7 +22,7 @@ Font_interface::get_default_font (Grob *me) { SCM chain = music_font_alist_chain (me); - fm = select_font (me->get_layout (), chain); + fm = select_font (me->layout (), chain); me->set_property ("font", fm->self_scm ()); } @@ -33,7 +33,9 @@ SCM Font_interface::music_font_alist_chain (Grob *g) { SCM defaults - = g->get_layout ()->lookup_variable (ly_symbol2scm ("font-defaults")); + = g->layout ()->lookup_variable (ly_symbol2scm ("font-defaults")); + if (defaults == SCM_UNDEFINED) + defaults = SCM_EOL; return g->get_property_alist_chain (defaults); } @@ -41,12 +43,22 @@ SCM Font_interface::text_font_alist_chain (Grob *g) { SCM defaults - = g->get_layout ()->lookup_variable (ly_symbol2scm ("text-font-defaults")); + = g->layout ()->lookup_variable (ly_symbol2scm ("text-font-defaults")); + if (defaults == SCM_UNDEFINED) + defaults = SCM_EOL; return g->get_property_alist_chain (defaults); } -ADD_INTERFACE (Font_interface, "font-interface", - "Any symbol that is typeset through fixed sets of glyphs, " - " (ie. fonts)", - "font-magnification font font-series font-shape " - "font-family font-encoding font-name font-size"); +ADD_INTERFACE (Font_interface, + "Any symbol that is typeset through fixed sets of glyphs," + " (i.e., fonts).", + + /* properties */ + "font " + "font-encoding " + "font-family " + "font-name " + "font-series " + "font-shape " + "font-size " + );