*** empty log message ***
[lilypond.git] / lily / pango-select-scheme.cc
blob1ae597c236450b017ec1a446feb65bcb341d9b12
1 /*
2 pango-select-scheme.cc -- implement Pango descr <-> string bindings
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "config.hh"
11 #if HAVE_PANGO_FT2
12 #include "pango-font.hh"
14 LY_DEFINE (ly_make_pango_description_string, "ly:make-pango-description-string",
15 2, 0, 0, (SCM chain, SCM size),
16 "Make a PangoFontDescription string for the property alist @var{chain} at size @var{size}.")
18 SCM_ASSERT_TYPE (scm_is_number (size), size, SCM_ARG1, __FUNCTION__, "number");
19 PangoFontDescription *pfd = properties_to_pango_description (chain, scm_to_double (size));
20 char *str = pango_font_description_to_string (pfd);
22 SCM scm_str = scm_makfrom0str (str);
23 g_free (str);
24 pango_font_description_free (pfd);
25 return scm_str;
28 #endif