<?php
 function cloudfw_run_typo_modules() { 
 	global $data;
	$data = cloudfw_get_font_data();
 	cloudfw_render_page( cloudfw_get_schemes('font_map') , $GLOBALS["args"] ); 
}

function cloudfw_grouped_font_list_cached() { 
 	static $font_list;
	
	if (!empty($font_list))
		return $font_list;
	
	$font_list = cloudfw_grouped_font_list();
	return $font_list;
}

function cloudfw_admin_get_custom_fonts_array() {

	global $custom_fonts;
	
	asort($custom_fonts);
			
	foreach ((array)$custom_fonts as $font_id => $font) {
		
		$custom_fonts_array[] =  array(
			"item_value"	=> $font_id,
			"item_class"	=> "",
			"item_html" 	=> '<span class="skin-name">'.$font["name"].''.$skin_version_echo.'</span>'
		);
						
	}
	
	return $custom_fonts_array;
	
}

function cloudfw_admin_get_google_fonts_array() {

	global $google_fonts;
	
	asort($google_fonts);
	
	foreach ((array)$google_fonts as $font_id) {
			
			$google_fonts_array[] =  array(
			"item_value"	=> $font_id,
			"item_class"	=> "",
			"item_html" 	=> '<span class="skin-name">'.$font_id.'</span>',
			);
						
	}
	
	return $google_fonts_array;
	
}