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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Idonex AB.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.201 2000/01/12 13:39:16 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.202 2000/01/30 21:18:46 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";         // ------------------- Module registration ---------------------      constant module_type = MODULE_PARSER;   constant module_name = "Graphics text";
Roxen.git/server/modules/graphics/graphic_text.pike:121:    }    res+="\n";    }    text=replace(res[..strlen(res)-2], ({"!","?",": "}),({ nbsp+"!",nbsp+"?",nbsp+": "}));    text=replace(replace(replace(text,({". ",". "+nbsp}),    ({"\000","\001"})),".","."+nbsp+nbsp),    ({"\000","\001"}),({". ","."+nbsp}));    }       if( args->afont ) -  font = resolve_font(args->afont+" "+(args->font_size||32)); +  font = resolve_font((args->afont||args->font)+" "+(args->font_size||32));    else    { -  if(!args->nfont) args->nfont = args->font; +     int bold=0, italic=0; -  +  if(args->nfont) args->font = args->nfont;    if(args->bold) bold=1;    if(args->light) bold=-1;    if(args->black) bold=2;    if(args->italic) italic=1; -  font = get_font(args->nfont||"default", -  (int)args->font_size||32,bold,italic, +  font = get_font(args->font||"default", +  (int)(args->font_size||args["font-size"])||32, +  bold, +  italic,    lower_case(args->talign||"left"), -  (float)(int)args->xpad, (float)(int)args->ypad); +  (float)args->xpad, +  (float)args->ypad);    } -  +  if(!font) +  font = resolve_font(0);       if (!font) -  error("gtext: No font!\n"); +  error("gtext: No font (tried "+ +  (args->afont||args->font||args->nfont)+ ")!\n");       // Fonts and such are now initialized.    img = GText.make_text_image(args, font, text, id);       // Now we have the image in 'img'.       if( !args->scroll && !args->fadein )    {    if(!args->notrans)    {