]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/ttf.cc
Merge with master
[lilypond.git] / lily / ttf.cc
index 8dfa7308f7e8f9a37439949e94172273623bf3a7..574d1464af7492278189db36e8a7be379a3050e8 100644 (file)
@@ -3,14 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "freetype.hh"
 
 #include <freetype/tttables.h>
 
-#include "lily-proto.hh"
 #include "memory-stream.hh"
 #include "warn.hh"
 #include "lily-guile.hh"
@@ -169,7 +168,7 @@ print_trailer (void *out,
                                              GLYPH_NAME_LEN);
          if (error)
            {
-             programming_error ("print_trailer(): FT_Get_Glyph_Name() returned error");
+             programming_error ("FT_Get_Glyph_Name(): error.");
              glyph_name[0] = 0;
            }
        }
@@ -224,15 +223,14 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
           1, 0, 0, (SCM ttf_file_name),
           "Extract the PostScript name from a TrueType font.")
 {
-  SCM_ASSERT_TYPE (scm_is_string (ttf_file_name), ttf_file_name,
-                  SCM_ARG1, __FUNCTION__, "string");
+  LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
   string file_name = ly_scm2string (ttf_file_name);
   if (be_verbose_global)
     progress_indication ("[" + file_name);
 
   FT_Face face = open_ft_face (file_name);
   char const *ps_name_str0 = FT_Get_Postscript_Name (face);
-  SCM ps_name = scm_makfrom0str (ps_name_str0 ? ps_name_str0 : "");
+  SCM ps_name = scm_from_locale_string (ps_name_str0 ? ps_name_str0 : "");
   
   FT_Done_Face (face);
   
@@ -244,13 +242,12 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
 
 
 
-LY_DEFINE (ly_ttf_to_pfa, "ly:ttf->pfa",
+LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa",
           1, 0, 0, (SCM ttf_file_name),
           "Convert the contents of a TTF file to Type42 PFA, returning it as "
           " a string.")
 {
-  SCM_ASSERT_TYPE (scm_is_string (ttf_file_name), ttf_file_name,
-                  SCM_ARG1, __FUNCTION__, "string");
+  LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
 
   string file_name = ly_scm2string (ttf_file_name);
   if (be_verbose_global)