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

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.66 2000/12/01 08:10:00 hubbe Exp $ */ + /* $Id: font.c,v 1.67 2001/07/12 13:26:03 grubba Exp $ */   #include "global.h"      #define SPACE_CHAR 'i'      extern unsigned char * image_default_font;   #define IMAGE_DEFAULT_FONT_SIZE 30596      /*   **! module Image   **! note - **! $Id: font.c,v 1.66 2000/12/01 08:10:00 hubbe Exp $ + **! $Id: font.c,v 1.67 2001/07/12 13:26:03 grubba 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:245:   }      static void exit_font_struct(struct object *obj)   {    free_font_struct(THIS);    THIS=NULL;   }      /***************** internals ***********************************/    - static INLINE ptrdiff_t char_space(struct font *this, INT32 c) + static INLINE int char_space(struct font *this, INT32 c)   {    if(c==0x20)    return DOUBLE_TO_INT((double)(this->height*this->xspacing_scale)/4.5);    else if(c==0x20+128) -  return (this->height*this->xspacing_scale)/18; -  return this->charinfo[c].spacing*this->xspacing_scale; +  return DOUBLE_TO_INT((this->height*this->xspacing_scale)/18); +  return DOUBLE_TO_INT(this->charinfo[c].spacing*this->xspacing_scale);   }      static INLINE int char_width(struct font *this, INT32 c)   {    if(c==0x20 || c==0x20+128) return 0;    return this->charinfo[c].width;   }      #ifndef HAVE_MMAP   static INLINE ptrdiff_t my_read(int from, void *t, size_t towrite)
pike.git/src/modules/Image/font.c:823:    }    break;    default:    fatal("Illegal shift size!\n");    }    if (max>maxwidth2) maxwidth2=max;    }       pop_n_elems(args);    push_int(maxwidth2); -  push_int64(args * THIS->height * THIS->yspacing_scale); +  push_int64(DO_NOT_WARN((INT64)(args * THIS->height * THIS->yspacing_scale)));    f_aggregate(2);   }            /*   **! method void set_xspacing_scale(float scale)   **! method void set_yspacing_scale(float scale)   **! Set spacing scale to write characters closer   **! or more far away. This does not change scale