Roxen.git
/
server
/
font_handlers
/
imagedir.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/font_handlers/imagedir.pike:1:
#include <config.h> #include <stat.h>
-
constant cvs_version = "$Id: imagedir.pike,v 1.
10
2001/
01
/
04
10
:
00
:
12
nilsson Exp $";
+
constant cvs_version = "$Id: imagedir.pike,v 1.
11
2001/
08
/
29
18
:
42
:
28
nilsson 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:22:
"alpha":Image.Image(10,1) ]); static mapping smallspacechar = ([ "image":Image.Image(2,1), "alpha":Image.Image(2,1) ]); class myFont { inherit Font; static string path; static int size, rsize; static array files;
-
-
static
string _sprintf()
+
string _sprintf()
{ return sprintf( "FontDir(%O,%d)", path, height() ); } static string encode_char( string c ) { int cc = c[0]; if( (cc < 48) || (cc > 127) ) return sprintf( "0x%x", cc ); return c; }