2011/3/23 Michael Van Canneyt <[email protected]>:
>> 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

<<attachment: test.png>>

Attachment: t.pp
Description: Binary data

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to