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

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.60 2000/07/28 07:12:44 hubbe Exp $ */ + /* $Id: font.c,v 1.61 2000/08/10 09:51:53 per 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.60 2000/07/28 07:12:44 hubbe Exp $ + **! $Id: font.c,v 1.61 2000/08/10 09:51:53 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:246:   {    free_font_struct(THIS);    THIS=NULL;   }      /***************** internals ***********************************/      static INLINE int char_space(struct font *this, INT32 c)   {    if(c==0x20) -  return (int)((float)(this->height*this->xspacing_scale)/4.5); +  return (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;   }      static INLINE int char_width(struct font *this, INT32 c)   {    if(c==0x20 || c==0x20+128) return 0;    return this->charinfo[c].width;   }