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

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.43 1999/02/10 21:48:27 hubbe Exp $ */ + /* $Id: font.c,v 1.44 1999/04/13 12:32:20 mirar Exp $ */   #include "global.h"   #include <config.h>      #define SPACE_CHAR 'i'      /*   **! module Image   **! note - **! $Id: font.c,v 1.43 1999/02/10 21:48:27 hubbe Exp $ - **! class font + **! $Id: font.c,v 1.44 1999/04/13 12:32:20 mirar 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>.   **!   **! other methods: <ref>baseline</ref>,
pike.git/src/modules/Image/font.c:81:   **! 2 8bit Greyscale with alpha (index->color, 256*2 bytes)   **!   **! Kerningtable types:   **! 0 No kerning table   **! 1 numchars*numchars entries, each a signed char with the kerning value   **! 2 numchar entries, each with a list of kerning pairs, like this:   **! int len   **! len * (short char, short value)   **! **! </pre>   **! - **! see also: Image, Image.image + **! see also: Image, Image.Image   */      /* Dump a font into a Roxen Font file (format version 2)       On-disk syntax (everything in N.B.O), int is 4 bytes, a byte is 8 bits:      pos    0 int cookie = 'FONT'; or 0x464f4e54    4 int version = 2; 1 was the old version without the last four chars    8 int numchars; Always 256 in this version of the dump program
pike.git/src/modules/Image/font.c:507:       pop_n_elems(args);    push_int(0);    return;   }      /*   **! method object write(string text,...)   **! Writes some text; thus creating an image object   **! that can be used as mask or as a complete picture. - **! returns an <ref>Image.image</ref> object + **! returns an <ref>Image.Image</ref> object   **! arg string text, ...   **! One or more lines of text. - **! see also: text_extents, load, Image.image->paste_mask, Image.image->paste_alpha_color + **! see also: text_extents, load, Image.Image->paste_mask, Image.Image->paste_alpha_color   */      void font_write(INT32 args)   {    struct object *o;    struct image *img;    INT32 xsize=0,i,maxwidth2,j;    int *width_of;    p_wchar0 *to_write0;    p_wchar1 *to_write1;
pike.git/src/modules/Image/font.c:915:    /* function(void:void) */    ADD_FUNCTION("left", font_set_left,tFunc(tVoid,tVoid), 0);    /* function(void:void) */    ADD_FUNCTION("right", font_set_right,tFunc(tVoid,tVoid), 0);          set_init_callback(init_font_struct);    set_exit_callback(exit_font_struct);       font_program=end_program(); -  add_program_constant("font",font_program, 0); +  add_program_constant("font",font_program, 0); /* compat */ +  add_program_constant("Font",font_program, 0);   }      void exit_font(void)   {    if(font_program)    {    free_program(font_program);    font_program=0;    }   }