/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2007--2012 Han-Wen Nienhuys <hanwen@lilypond.org>
+ Copyright (C) 2007--2015 Han-Wen Nienhuys <hanwen@lilypond.org>
LilyPond is free software: you can redistribute it and/or modify
#include "all-font-metrics.hh"
#include "main.hh"
+#include "protected-scm.hh"
+
+All_font_metrics *all_fonts_global = 0;
+Protected_scm all_fonts_global_scm;
LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
(),
"Forget all about previously loaded fonts.")
{
- delete all_fonts_global;
all_fonts_global = new All_font_metrics (global_path.to_string ());
+ all_fonts_global_scm = all_fonts_global->unprotect ();
return SCM_UNSPECIFIED;
}