pike.git / src / modules / Image / font.c

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.40 1998/10/11 19:07:26 marcus Exp $ */ + /* $Id: font.c,v 1.41 1998/11/03 08:38:05 per Exp $ */   #include "global.h"   #include <config.h>      #define SPACE_CHAR 'i'      /*   **! module Image   **! note - **! $Id: font.c,v 1.40 1998/10/11 19:07:26 marcus Exp $ + **! $Id: font.c,v 1.41 1998/11/03 08:38:05 per Exp $   **! class font   **!   **! note   **! Short technical documentation on a font file:   **! This object adds the text-drawing and -creation   **! capabilities of the <ref>Image</ref> module.   **!   **! For simple usage, see   **! <ref>write</ref> and <ref>load</ref>.   **!
pike.git/src/modules/Image/font.c:553:    error("font->write: illegal argument(s)\n");       xsize = max = 1;    to_write_len = sp[j-args].u.string->len;    switch(sp[j-args].u.string->size_shift)    {    case 0:    to_write0 = STR0(sp[j-args].u.string);    for (i = 0; i < to_write_len; i++)    { +  if (to_write0[i] < (INT32)this->chars) +  {    if (xsize+char_width(this,to_write0[i]) > max)    max=xsize+char_width(this,to_write0[i]);    xsize += char_space(this,to_write0[i]);    if (xsize > max) max=xsize;    } -  +  }    break;    case 1:    to_write1 = STR1(sp[j-args].u.string);    for (i = 0; i < to_write_len; i++)    { -  +  if (to_write1[i] < (INT32)this->chars) +  {    if (xsize+char_width(this,to_write1[i]) > max)    max=xsize+char_width(this,to_write1[i]);    xsize += char_space(this,to_write1[i]);    if (xsize > max) max=xsize;    } -  +  }    break;    case 2:    to_write2 = STR2(sp[j-args].u.string);    for (i = 0; i < to_write_len; i++)    { -  +  if (to_write2[i] < (unsigned INT32)this->chars) +  {    if (xsize+char_width(this,to_write2[i]) > max)    max=xsize+char_width(this,to_write2[i]);    xsize += char_space(this,to_write2[i]);    if (xsize > max) max=xsize;    } -  +  }    break;    default:    fatal("Illegal shift size!\n");    }    width_of[j]=max;    if (max>maxwidth2) maxwidth2=max;    }       o = clone_object(image_program,0);    img = ((struct image*)o->storage);