On Sat, 28 Dec 2019, Andreas Frieß wrote:

Hello,

both fonts are on the system, see attached textfile. It was the content
of the Windows Font Directory only.

But where in the sample is setting this path on a windows machine? No
one. I have inserted a printout of the actual Font search path. The path
(for windows) is NOT SET by default. This is the first issue. And where
should the fallback found ? It can not be found too, because no path to
the system font dir was set.

The paths are set in udapp.pp, line 257 and following:

procedure TReportRunner.RunReport(AFileName : string);

begin
  // specify what directories should be used to find TrueType fonts
  gTTFontCache.SearchPath.Add(Location+'/fonts/');
{$IFDEF UNIX}
  gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
  gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/');
  gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
{$ENDIF}

The question is still: why is it looking for Arial ?

I understand that it is the fallback/default font, but since the font is set
explicitly to liberation sans, which exists in the fonts subdir, the Arial font should not be searched to begin with. If the demo looks for it on
windows, I would like to know why.

Your solution of reading standard system fonts will of course also help
since that will search the windows fonts dir, but the intention of the demos was to be able to work without using the system fonts.

So I come back to my initial question: why is it looking for Arial ?

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to