X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fall-font-metrics-scheme.cc;h=354a2b10d85a8e11130b785b2f30c3db2dc92a50;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=178331006687d9814b9915925d617ba2ed4dfad6;hpb=8e622ad48c6b9d5d1042a350befe322edf6404c5;p=lilypond.git diff --git a/lily/all-font-metrics-scheme.cc b/lily/all-font-metrics-scheme.cc index 1783310066..354a2b10d8 100644 --- a/lily/all-font-metrics-scheme.cc +++ b/lily/all-font-metrics-scheme.cc @@ -1,19 +1,29 @@ -/* - all-font-metrics-scheme.cc -- implement bindings for - All_font_metrics. - - source file of the GNU LilyPond music typesetter - - (c) 2007 Han-Wen Nienhuys - +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 2007--2014 Han-Wen Nienhuys + + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "all-font-metrics.hh" #include "main.hh" LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0, - (), - "Forget all about previously loaded fonts. ") + (), + "Forget all about previously loaded fonts.") { delete all_fonts_global; all_fonts_global = new All_font_metrics (global_path.to_string ()); @@ -21,17 +31,24 @@ LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0, return SCM_UNSPECIFIED; } - -LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0, - (SCM name), - "Load the font @var{name}. ") +LY_DEFINE (ly_system_font_load, "ly:system-font-load", 1, 0, 0, + (SCM name), + "Load the OpenType system font @file{@var{name}.otf}." + " Fonts loaded with this command must contain three" + " additional SFNT font tables called @code{LILC}," + " @code{LILF}, and @code{LILY}, needed for typesetting" + " musical elements. Currently, only the Emmentaler and" + " the Emmentaler-Brace fonts fulfill these requirements.\n" + "\n" + "Note that only @code{ly:font-get-glyph} and derived" + " code (like @code{\\lookup}) can access glyphs from" + " the system fonts; text strings are handled exclusively" + " via the Pango interface.") { - LY_FUNC_NOTE_FIRST_ARG(name); - LY_ASSERT_TYPE(scm_is_string,1); - - Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name)); + LY_ASSERT_TYPE (scm_is_string, name, 1); + + string name_str = ly_scm2string (name); + Font_metric *fm = all_fonts_global->find_font (name_str); return fm->self_scm (); } - -