Roxen.git/server/font_handlers/ttf.pike:1:
// This file is part of Roxen WebServer.
// Copyright © 1996 - 2009, Roxen IS.
#if !constant(Image.FreeType.Face)
#if constant(has_Image_TTF)
#include <config.h>
- constant cvs_version = "$Id: ttf.pike,v 1.19 2009/05/07 14:15:53 mast Exp $";
+ constant cvs_version = "$Id: ttf.pike,v 1.20 2011/12/28 18:29:37 mast Exp $";
constant name = "TTF fonts";
constant doc = "True Type font loader. Uses freetype to render text.";
constant scalable = 1;
inherit FontHandler;
protected mapping ttf_font_names_cache;
protected string trimttfname( string n )
Roxen.git/server/font_handlers/ttf.pike:41: Inside #if !constant(Image.FreeType.Face)
// Combine to full style
return weight + slant;
}
protected void build_font_names_cache( )
{
mapping ttf_done = ([ ]);
mapping new_ttf_font_names_cache=([]);
void traverse_font_dir( string dir )
{
+ dir = roxen_path (dir);
foreach(r_get_dir( dir )||({}), string fname)
{
string path=combine_path(dir+"/",fname);
if(!ttf_done[path]++)
{
Stat a=file_stat(path);
if(a && a[1]==-2) {
if( !file_stat( path+"/fontname" ) )
// no, we do not want to try this dir. :-)
traverse_font_dir( path );