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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.58 1997/08/31 04:12:43 peter Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.59 1997/09/01 01:38:58 per Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image
Roxen.git/server/modules/graphics/graphic_text.pike:153:    list_fonts());   #endif   }      string query_location() { return query("location"); }      object(Font) load_font(string name, string justification, int xs, int ys)   {    object fnt = Font();    -  if ((!name)||(name == "")) { -  name = QUERY(default_size)+"/"+QUERY(default_font); +  if ((!name)||(name == "")) +  { +  return get_font("default",(int)args->font_size||32,0,0, +  lower_case(args->justification||"left"), +  (float)xs, (float)ys);    } else if(sscanf(name, "%*s/%*s") != 2) {    name=QUERY(default_size)+"/"+name;    }       name = "fonts/" + name;       if(!fnt->load( name ))    {    report_debug("Failed to load the compatibility font "+name+    ", using the default font.\n"); -  if(!fnt->load("fonts/"+QUERY(default_size) +"/"+ QUERY(default_font))) -  report_error("Failed to load the default compatibility font\n"); +  return get_font("default",(int)args->font_size||32,0,0, +  lower_case(args->justification||"left"), +  (float)xs, (float)ys);    } -  catch { +  catch +  {    if(justification=="right") fnt->right();    if(justification=="center") fnt->center();    if(xs)fnt->set_x_spacing((100.0+(float)xs)/100.0);    if(ys)fnt->set_y_spacing((100.0+(float)ys)/100.0);    };    return fnt;   }      static private mapping (int:mapping(string:mixed)) cached_args = ([ ]);   
Roxen.git/server/modules/graphics/graphic_text.pike:622:         #if efun(get_font)    if(args->nfont)    {    int bold, italic;    if(args->bold) bold=1;    if(args->light) bold=-1;    if(args->italic) italic=1;    if(args->black) bold=2; -  data = get_font(args->nfont,(int)args->font_size,bold,italic, +  data = get_font(args->nfont,(int)args->font_size||32,bold,italic,    lower_case(args->talign||"left"),    (float)(int)args->xpad, (float)(int)args->ypad);    }    else   #endif    {    string fkey = args->font+"/"+args->talign+"/"+args->xpad+"/"+args->ypad;    data = cache_lookup("fonts", fkey);    if(!data)    {