[fpc-pascal] fcl-report demos not working on windows10/64 with win64 compiled - Font Arial not found

Michael Van Canneyt michael at freepascal.org
Sun Dec 29 10:58:31 CET 2019



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.


More information about the fpc-pascal mailing list