Forum > TAChart

TAChart demo nogui does not output text

(1/4) > >>

Hi, I'm trying out the nogui tachart demo, this does output an image, only it's without text. The output looks like the attached picture.

Demo location: C:\lazarus\components\tachart\demo\nogui

I've done a clean installation of the latest version of lazarus.
I've downloaded the freetype.dll and freetype.lib from this site, and put it in the executable folder. ( )

I've also tested this in Debian with the same result, I'm trying to figure this out for days, but I'm not able to get it to work.

I know...

Checking various Laz versions, I see that the issue came in between Laz 2.0.8/FPC 3.0.4 and Laz 2.0.10/FPC3.2. I am still investigating. It looks as if some scaling factor for the text is missing somewhere. I am also looking at the freetype font handling in FPC which saw some changes but they should have made it into 3.2.0, and stand-alone text output using ftFont (e.g. fpc/.../fcl-image/examples/textout.pp) is correct.

Please check out the new revision from Lazarus-main. I could find some issues in the TADrawerFPCanvas unit, and I think there were also some issues in the FCL-Image Freetype units which, however, seem to have been fixed at some point in the near past - I did not try to go through the steps through finding the correct FPC revision.

For me, the nogui demo runs fine with the new Laz main in combination with FPC-main or FPC-fixes. The combination with FPC 3.2.2 or 3.2.0 still has the missing texts (probably because the FreeType fix came after the release of FPC 3.2.2). This is for windows; but on Linux the texts do show up also with FPC 3.2.2 - I don't understand why this happens... I did not check cocoa because I did not yet switch to the git version of Laz there.

There is a new procedure, InitFonts, which sets the search path for the FTFont FontMgr to the standard font directories for Linux and mac. Call this very early in your program and you will not have to specify fonts names with path any more.

I've tested it with Lazarus RC1 on Windows and Linux, both didn't show text for me. (Windows you already said it wouldn't)

lazarus-project/now 2.2.0RC1 amd64 [installed,local]
fpc-laz/now 3.2.2 amd64 [installed,local]
fpc-src/now 3.2.2 amd64 [installed,local]


--- Quote from: MaartenJB on September 16, 2021, 10:40:52 am ---I've tested it with Lazarus RC1

--- End quote ---
The fix is not in RC1, but in only "main" (what used to be trunk in the pre-git days); when it is confirmed to work I'll put it into "fixes_2_2" as well.


[0] Message Index

[#] Next page

Go to full version