Recent

Author Topic: TAChart demo nogui does not output text  (Read 884 times)

MaartenJB

  • Jr. Member
  • **
  • Posts: 84
TAChart demo nogui does not output text
« on: September 15, 2021, 11:25:34 am »
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. ( https://github.com/ubawurinna/freetype-windows-binaries/tree/master/release%20dll/win64 )

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.

wp

  • Hero Member
  • *****
  • Posts: 8743
Re: TAChart demo nogui does not output text
« Reply #1 on: September 15, 2021, 12:17:57 pm »
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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

wp

  • Hero Member
  • *****
  • Posts: 8743
Re: TAChart demo nogui does not output text
« Reply #2 on: September 16, 2021, 12:57:16 am »
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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MaartenJB

  • Jr. Member
  • **
  • Posts: 84
Re: TAChart demo nogui does not output text
« Reply #3 on: September 16, 2021, 10:40:52 am »
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]


wp

  • Hero Member
  • *****
  • Posts: 8743
Re: TAChart demo nogui does not output text
« Reply #4 on: September 16, 2021, 11:03:15 am »
I've tested it with Lazarus RC1
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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MaartenJB

  • Jr. Member
  • **
  • Posts: 84
Re: TAChart demo nogui does not output text
« Reply #5 on: September 16, 2021, 11:44:52 am »
Is there an official git repository? I thought everything was still on subversion.

wp

  • Hero Member
  • *****
  • Posts: 8743
Re: TAChart demo nogui does not output text
« Reply #6 on: September 16, 2021, 11:54:05 am »
https://gitlab.com/freepascal.org/lazarus/lazarus

Search the forum - there were numerous discussions related to the svn-to-git transition which occured a few weeks ago.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MaartenJB

  • Jr. Member
  • **
  • Posts: 84
Re: TAChart demo nogui does not output text
« Reply #7 on: September 16, 2021, 12:06:35 pm »
Ah, nice, thx. I checked the wiki page...

 

TinyPortal © 2005-2018