+ if (!FcConfigAppFontAddDir (0, (const FcChar8 *)d.c_str ()))
+ error (_f ("failed adding font directory: %s", d.c_str ()));
+ else
+ debug_output (_f ("Adding font directory: %s", d.c_str ()));
+
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_font_config_add_font, "ly:font-config-add-font", 1, 0, 0,
+ (SCM font),
+ "Add font @var{font} to FontConfig.")
+{
+ LY_ASSERT_TYPE (scm_is_string, font, 1);
+
+ string f = ly_scm2string (font);
+
+ if (!FcConfigAppFontAddFile (0, (const FcChar8 *)f.c_str ()))
+ error (_f ("failed adding font file: %s", f.c_str ()));
+ else
+ debug_output (_f ("Adding font file: %s", f.c_str ()));
+
+ return SCM_UNSPECIFIED;
+}