Roxen.git/server/font_handlers/builtin.pike:1:
#include <config.h>
#if constant(Image.FreeType.Face)
inherit "freetype";
#else
inherit "ttf";
#endif
- constant cvs_version = "$Id: builtin.pike,v 1.7 2000/12/11 12:49:58 per Exp $";
+ constant cvs_version = "$Id: builtin.pike,v 1.8 2001/02/01 09:43:14 per Exp $";
constant name = "Builtin fonts";
constant doc = "Fonts included in pike (and roxen)";
inherit FontHandler;
array available_fonts()
{
return ({ "pike builtin", "roxen builtin" });
}
Roxen.git/server/font_handlers/builtin.pike:59: Inside #if defined(THREADS)
#ifdef THREADS
Thread.Mutex lock = Thread.Mutex();
#endif
Font open( string name, int size, int bold, int italic )
{
switch( replace(lower_case(name)," ","_")-"_" )
{
case "roxenbuiltin":
#if constant(__rbf) && constant(grbf)
+ #ifdef THREADS
object key = lock->lock();
-
+ #endif
#if constant(Image.FreeType.Face)
if( !roxenbuiltin ) catch(roxenbuiltin = grbf());
if( roxenbuiltin ) return FTFont( roxenbuiltin, size, "-" );
#else
if( !roxenbuiltin ) catch(roxenbuiltin = grbf());
if( roxenbuiltin ) return TTFWrapper( roxenbuiltin(), size, "-" );
#endif
#endif
case "pikebuiltin":
return Image.Font();
}
}