Roxen.git/server/font_handlers/ttf.pike:1:
// This file is part of Roxen WebServer.
// Copyright © 1996 - 2000, Roxen IS.
#if !constant(Image.FreeType.Face)
#if constant(has_Image_TTF)
#include <config.h>
- constant cvs_version = "$Id: ttf.pike,v 1.11 2001/11/14 13:36:09 grubba Exp $";
+ constant cvs_version = "$Id: ttf.pike,v 1.12 2001/11/15 10:49:12 anders Exp $";
constant name = "TTF fonts";
constant doc = "True Type font loader. Uses freetype to render text.";
constant scalable = 1;
inherit FontHandler;
static mapping ttf_font_names_cache;
static string trimttfname( string n )
Roxen.git/server/font_handlers/ttf.pike:210: Inside #if !constant(Image.FreeType.Face)
if( font[0] == '/' )
f = Image.TTF( font );
else
f = Image.TTF( (font=values(ttf_font_names_cache[ font ])[0]) );
res->path = font;
res |= f->names();
return ({ res });
}
- array(string) has_font( string name, int size, int(0..1) force )
+ array(string) has_font( string name, int size, int(0..1)|void force )
{
#ifdef THREADS
object key = lock->lock();
#endif
if( !ttf_font_names_cache )
build_font_names_cache( );
if( ttf_font_names_cache[ name ] )
return indices(ttf_font_names_cache[ name ]);
if (force) {
build_font_names_cache();