]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-config-scheme.cc
Run `make grand-replace'.
[lilypond.git] / lily / font-config-scheme.cc
index 351319c6626007b7f773fcd60b14906fde04c396..9d3dac9d594a47ab63bf14ccc64c436842daae73 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 */
 
@@ -55,9 +55,9 @@ string
 display_config (FcConfig *fcc)
 {
   string retval;
-  retval += display_strlist ("Config files", FcConfigGetConfigFiles(fcc));
-  retval +=  display_strlist ("Config dir", FcConfigGetConfigDirs(fcc));
-  retval +=  display_strlist ("Font dir", FcConfigGetFontDirs(fcc));
+  retval += display_strlist ("Config files", FcConfigGetConfigFiles (fcc));
+  retval +=  display_strlist ("Config dir", FcConfigGetConfigDirs (fcc));
+  retval +=  display_strlist ("Font dir", FcConfigGetFontDirs (fcc));
   return retval;
 }
 
@@ -87,18 +87,16 @@ display_list (FcConfig *fcc)
 
 LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0,
           (SCM name),
-          "Get the file for font @var{name}")
+          "Get the file for font @var{name}.")
 {
-  SCM_ASSERT_TYPE (scm_is_string (name), name,
-                  SCM_ARG1, __FUNCTION__, "string");
-
+  LY_ASSERT_TYPE (scm_is_string, name, 1);
   
   FcPattern*pat = FcPatternCreate ();
   FcValue val;
   
   val.type = FcTypeString;
   val.u.s = (const FcChar8*)ly_scm2string (name).c_str (); // FC_SLANT_ITALIC;
-  FcPatternAdd(pat, FC_FAMILY, val, FcFalse);
+  FcPatternAdd (pat, FC_FAMILY, val, FcFalse);
 
   FcResult result;
   SCM scm_result = SCM_BOOL_F;
@@ -106,7 +104,7 @@ LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0
   FcConfigSubstitute (NULL, pat, FcMatchFont);
   FcDefaultSubstitute (pat);
   
-  pat = FcFontMatch(NULL, pat, &result);
+  pat = FcFontMatch (NULL, pat, &result);
   FcChar8 *str = 0;
   if (FcPatternGetString (pat, FC_FILE, 0, &str) == FcResultMatch)
     scm_result = scm_from_locale_string ((char const*) str);