Roxen.git / server / font_handlers / imagedir.pike

version» Context lines:

Roxen.git/server/font_handlers/imagedir.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 2000 - 2001, Roxen IS.      #include <config.h>   #include <stat.h> - constant cvs_version = "$Id: imagedir.pike,v 1.12 2001/09/25 22:54:43 nilsson Exp $"; + constant cvs_version = "$Id: imagedir.pike,v 1.13 2003/09/18 16:31:22 mast Exp $";      constant name = "Image directory fonts";   constant doc = ("Handles a directory with images (in almost any format), each "    "named after the character they will represent. Characters "    "with codes larger than 127 or less than 48 are encoded like "    "0xHEX where HEX is the code in hexadecimal. There must be a "    "file named 'fontname' in the directory, the first line of "    "that file is used as the name of the font");      inherit FontHandler;
Roxen.git/server/font_handlers/imagedir.pike:175:    what=(lower_case( replace(what," ","_") )/"\n")[0]-"\r";    if(sizeof(_meta_data)) meta_data[what]=_meta_data;    return what;   }      void update_font_list()   {    font_list = ([]);    foreach(roxen->query("font_dirs"), string dir)    foreach( (get_dir( dir )||({})), string d ) -  if( file_stat( dir+d )[ ST_SIZE ] == -2 ) { // isdir +  if( Stdio.is_dir( dir+d ) ) {    if( file_stat( dir+d+"/fontinfo" ) )    font_list[font_name(Stdio.read_bytes(dir+d+"/fontinfo"))]=dir+d+"/";    else if( file_stat( dir+d+"/fontname" ) )    font_list[font_name(Stdio.read_bytes(dir+d+"/fontname"))]=dir+d+"/";    }   }      array available_fonts()   {   #ifdef THREADS