Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - string cvs_version="$Id: graphic_text.pike,v 1.23.2.2 1997/02/15 15:46:58 grubba Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.23.2.3 1997/02/22 20:03:58 grubba Exp $";   #include <module.h>   inherit "module";   inherit "roxenlib";         array register_module()   {    return ({ MODULE_LOCATION | MODULE_PARSER,    "Graphics text",    "Makes a few new tags, which render text to gifs "
Roxen.git/server/modules/graphics/graphic_text.pike:123:   }      string query_location() { return query("location"); }      mapping (string:object) fonts = ([]);      object(Font) load_font(string name, string justification, int xs, int ys)   {    object fnt = Font();    -  if(sscanf(name, "%*s/%*s") != 2) +  if ((!name)||(name == "")) { +  name = QUERY(default_size)+"/"+QUERY(default_font); +  } else if(sscanf(name, "%*s/%*s") != 2) {    name=QUERY(default_size)+"/"+name; -  +  }       name = "fonts/" + name;       if(!fnt->load( name ))    {    perror("Failed to load the font "+name+", using the default font.\n");    if(!fnt->load("fonts/"+QUERY(default_size) +"/"+ QUERY(default_font)))    error("Failed to load the default font\n");    }