[Lazarus] Get JPEG from TAChart in CGI app

Alexander Klenin klenin at gmail.com
Wed Mar 23 12:05:43 CET 2011


2011/3/23 Michael Van Canneyt <michael at freepascal.org>:
>> Now I just have to figure out how to draw text on FPCanvas...
>
> You need the ftfont, freetype, freetypeh units. Then create a TFreetypeFont
> instance, assign to canvas.font, and call TextRect() or whatever you would
> call normally.
>

Thanks for the pointer. I have added TFreetypeFont to the FPCanvas drawer.
See nogui demo since r29999.

However, I have encountered many problems:
1) FPCanvas drawer no requires freetype library even if no text is
actually drawn.
I can work around it by creating separate descendant drawer, but it is
frustrating.
2) FreeType library from gtk-windows is called 'freetype6.dll',
but freetypeh unit wants ''freetype-6.dll'.
I have no idea which is correct, but no the dll must be copied twice
(or symlinked, of course, but Windows symlink support is poor).
3) Kerning is totally broken. Maybe it is windows-specific problem,
but look at the attached code and screenshot to see what I mean.

-- 
Alexander S. Klenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 1524 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110323/3df89000/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.pp
Type: application/octet-stream
Size: 510 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110323/3df89000/attachment-0003.obj>


More information about the Lazarus mailing list