You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

map_fonts

map_fonts(map)
Fills a given map data structure with the id values of all font resources, keyed by strings of their names.
COPY/// map_fonts(map)
//
//  Fills a given map data structure with the id values of all
//  font resources, keyed by strings of their names.
//
//      map         map data structure, real
//
/// gmlscripts.pro/license
{
    var no,i,ds_map;
    ds_map = argument0
    no = font_add("ariel",12,false,false,32,32);
    font_delete(no);
    for (i=0;i<no;i+=1) {
        if (path_exists(i)) {
            ds_map_add(ds_map,path_get_name(i),i)
        }
    }
    return 0;
}

Contributors: paul23

GitHub: View · Commits · Blame · Raw