this is the replacement of that public function and worked fine for me:
public function remove_custom_font_google_url( $fonts ) {
$custom_fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts();
if ( ! empty( $custom_fonts ) ) {
foreach ( $custom_fonts as $key => $value ) {
$font_key = "'" . $key . "'";
if ( isset( $value['font_fallback'] ) && $value['font_fallback'] ) {
$font_key .= ', ' . $value['font_fallback'];
}
if ( array_key_exists( $font_key, $fonts ) ) {
unset( $fonts[ $font_key ] );
}
}
}
return $fonts;
}