2011/4/5 silvioprog <[email protected]>: > Hi. > > In a simple CGI app, I try to use TFreeTypeFont class, but without success. > The error returned is "Error 500"(see log in [1]). > > In attached I send a small sample to reproduce the error. > > *Lazarus 0.9.31 r30005 FPC 2.5.1 i386-win32-win32/win64 / XAMPP 1.7.3! > on Windows Seven 64.* > > Thx. > > [1]: > --------------------------- > Date: Tue, 05 Apr 2011 14:54:11 GMT > Server: Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l > mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 > Perl/v5.10.1 > Vary: accept-language,accept-charset > Accept-Ranges: bytes > Connection: close > Content-Type: text/html; charset=iso-8859-1 > Content-Language: pt-br > --------------------------- > > 500 Internal Server Error
I'm trying to write a text in an image and show in the browser. This code[1] not works (returns error 500). [1] (http://www.mail-archive.com/[email protected]/msg18488/t.pp): uses FPCanvas, FPImage, FPImgCanv, FTFont, FPWritePNG; var img: TFPMemoryImage; c: TFPImageCanvas; f: TFreeTypeFont; begin img := TFPMemoryImage.Create(500, 100); c := TFPImageCanvas.Create(img); f := TFreeTypeFont.Create; c.Clear; c.Pen.FPColor := colRed; f.Name := 'Times'; f.Size := 14; f.FPColor := colRed; c.Font := f; c.TextOut(10, 20, 'sample text 12345'); img.SaveToFile('test.png'); f.Free; c.Free; img.Free; end. -- Silvio Clécio ============================================= Blog - silvioprog.com.br Twitter - twitter.com/silvioprog LazSolutions - code.google.com/p/lazsolutions Lazarus-BR - groups.google.com.br/group/lazarus-br?hl=pt-BR ============================================= -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
