Roxen.git/server/font_handlers/builtin.pike:1:
// This file is part of Roxen WebServer.
// Copyright © 2000 - 2004, Roxen IS.
#include <config.h>
#if constant(Image.FreeType.Face)
inherit "freetype";
#else
inherit "ttf";
#endif
- constant cvs_version = "$Id: builtin.pike,v 1.14 2004/06/30 16:58:48 mast Exp $";
+ constant cvs_version = "$Id: builtin.pike,v 1.15 2005/02/25 16:11:14 grubba 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:62: Inside #if defined(THREADS)
object roxenbuiltin;
#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":
+ Configuration conf = roxen->current_configuration->get();
+ License.Key license_key = conf && conf->getvar("license")->get_key();
+ if (license_key && license_key->type() == "personal")
+ return Image.Font();
#if constant(__rbf) && constant(grbf)
#ifdef THREADS
object key = lock->lock();
#endif
if( !roxenbuiltin )
if( mixed err = catch(roxenbuiltin = grbf()) )
#ifdef DEBUG
werror("Failed to open builtin font: %s\n",
describe_backtrace( err ) );
#else