Roxen.git / server / font_handlers / ttf.pike

version» Context lines:

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.20 2011/12/28 18:29:37 mast Exp $"; + constant cvs_version = "$Id$";      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:83: Inside #if !constant(Image.FreeType.Face)
   ttf_font_names_cache = new_ttf_font_names_cache;   }            class TTFWrapper   {    inherit Font;    protected int size, rsize;    protected object real; -  protected object encoder; +  protected Charset.Encoder encoder;    protected function(string ...:Image.image) real_write;    protected int fake_bold, fake_italic;       int height( )    {    return rsize ? rsize : (rsize = text_extents("W")[1] );    }       protected string _sprintf()    {
Roxen.git/server/font_handlers/ttf.pike:195: Inside #if !constant(Image.FreeType.Face)
   else    real->set_height( (int)(size*32/34.5) ); // aproximate to pixels       if(r_file_stat(fn+".properties"))    parse_html(lopen(fn+".properties","r")->read(), ([]),    (["encoding":lambda(string tag, mapping m, string enc) {    encoding = enc;    }]));       if(encoding) -  encoder = Locale.Charset.encoder(encoding, ""); +  encoder = Charset.encoder(encoding, "");       real_write = (encoder? write_encoded : real->write);    }   }      #ifdef THREADS   Thread.Mutex lock = Thread.Mutex();   #endif      array available_fonts(int(0..1)|void force_reload)