Branch: Tag:

1999-05-08

1999-05-08 00:52:43 by Per Hedbor <ph@opera.com>

Removed the (unused) load_font function

Rev: server/modules/graphics/graphic_text.pike:1.167

1: - constant cvs_version="$Id: graphic_text.pike,v 1.166 1999/03/11 23:07:24 mast Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.167 1999/05/08 00:52:43 per Exp $";   constant thread_safe=1;      #include <config.h>
117:      string query_location() { return query("location"); }    - object load_font(string name, string justification, int xs, int ys) - { -  object fnt = Image.font(); -  -  if ((!name)||(name == "")) -  { -  return get_font("default",32,0,0,lower_case(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"); -  return get_font("default",32,0,0,lower_case(justification||"left"), -  (float)xs, (float)ys); -  } -  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 cached_args = ([ ]);      #define MAX(a,b) ((a)<(b)?(b):(a))