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.16 1996/12/10 04:19:52 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.17 1996/12/10 04:21:11 per 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:408:       text = replace(text, ({ "&lt;", "&gt;", "&amp;" }), ({ "<", ">", "&" }));       // Check the cache first..    if(!id /*|| (!id->pragma["no-cache"])*/)    if(mixed data = cache_lookup("gtext:"+(_args-_start), text))    {    if(size) return data[1];    return data[0];    } -  +     // Nothing found in the cache. Generate a new image.    -  data = cache_lookup("fonts:fonts", -  args->font+args->justift+":"+ -  args->xpad+":"+args->ypad); +  +  +  string key = args->font+args->justift+":"+args->xpad+":"+args->ypad; +  data = cache_lookup("fonts", key);    if(!data)    {    data = load_font(args->font, lower_case(args->talign||"left"),(int)args->xpad,(int)args->ypad); -  cache_set("fonts:fonts", args->font, data); +  cache_set("fonts", key, data);    }       // Fonts and such are now initialized.       img = make_text_image(args,data,text);       // Now we have the image in 'img', or nothing.       if(!img) return 0;