This works:
function my_mce_settings_font ( $settings ) {
$font_formats= 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;AkrutiKndPadmini=Akpdmi-n';
$settings['font_formats'] = $font_formats;
return $settings;
};
add_filter('tiny_mce_before_init', 'my_mce_settings_font');
This does not work:
function my_mce_settings_font( $settings ) {
$generate_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_default_fonts()
);
$settings['font_formats'] = $generate_settings['font_body'];
return $settings;
}
add_filter( 'tiny_mce_before_init' , 'my_mce_settings_font' );
And that’s the whole function.
As I said, I think the problem is that TinyMCE needs the “CSS font-family Property”, with the different families separated by ;
Thank.