View Issue Details

IDProjectCategoryView StatusLast Update
0036609FPCfpReportpublic2020-01-20 20:26
ReporterPascal Riekenberg Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindows 10 x64 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0036609: [patch] tcreportgenarator.pas misses gTTFontCache.SearchPath.Clear
Descriptiontcreportgenarator.pas misses gTTFontCache.SearchPath.Clear.
Steps To ReproduceRun comandline version of testfpreport and get the following errors:

List of errors:
  Error:
    Message: TTestDemos.ImagesDemo: The font file <fonts\calibri.ttf> can't be found.
    Exception class: ETTF
    Exception message: The font file <fonts\calibri.ttf> can't be found.
        at $00000001000B3820

  Error:
    Message: TTestDemos.TTFDemo: The font file <fonts\calibri.ttf> can't be found.
    Exception class: ETTF
    Exception message: The font file <fonts\calibri.ttf> can't be found.
        at $00000001000B3820

  Error:
    Message: TTestDemos.DatasetDemo: The font file <fonts\calibri.ttf> can't be found.
    Exception class: ETTF
    Exception message: The font file <fonts\calibri.ttf> can't be found.
        at $00000001000B3820

  Error:
    Message: TTestDemos.JSONDemo: The font file <fonts\calibri.ttf> can't be found.
    Exception class: ETTF
    Exception message: The font file <fonts\calibri.ttf> can't be found.
        at $00000001000B3820
Additional InformationAttached patch fixes this.
TagsNo tags attached.
Fixed in Revision44004
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Pascal Riekenberg

2020-01-20 11:28

reporter  

tcreportgenerator.pas.patch (578 bytes)   
Index: packages/fcl-report/test/tcreportgenerator.pas
===================================================================
--- packages/fcl-report/test/tcreportgenerator.pas	(revision 44002)
+++ packages/fcl-report/test/tcreportgenerator.pas	(working copy)
@@ -94,6 +94,7 @@
   if not ForceDirectories(FFilePath+'rendered') then
      Fail('Could not create directory for rendered JSON');
   gTTFontCache.Clear;
+  gTTFontCache.SearchPath.Clear;
   gTTFontCache.SearchPath.Add(FFilePath+'fonts/');
   gTTFontCache.SearchPath.Add(FFilePath+'../demos/fonts/');
 {$IFDEF UNIX}
tcreportgenerator.pas.patch (578 bytes)   

Pascal Riekenberg

2020-01-20 12:01

reporter   ~0120569

Btw shouldn't gTTFontCache.Clear also call FSearchPath.Clear?

Michael Van Canneyt

2020-01-20 19:25

administrator   ~0120572

Applied.

And no: clear should simply clear the in-memory definitions, not the search path.

Pascal Riekenberg

2020-01-20 20:26

reporter   ~0120574

Okay, thanks.

Issue History

Date Modified Username Field Change
2020-01-20 11:28 Pascal Riekenberg New Issue
2020-01-20 11:28 Pascal Riekenberg Status new => assigned
2020-01-20 11:28 Pascal Riekenberg Assigned To => Michael Van Canneyt
2020-01-20 11:28 Pascal Riekenberg File Added: tcreportgenerator.pas.patch
2020-01-20 12:01 Pascal Riekenberg Note Added: 0120569
2020-01-20 19:25 Michael Van Canneyt Status assigned => resolved
2020-01-20 19:25 Michael Van Canneyt Resolution open => fixed
2020-01-20 19:25 Michael Van Canneyt Fixed in Version => 3.3.1
2020-01-20 19:25 Michael Van Canneyt Fixed in Revision => 44004
2020-01-20 19:25 Michael Van Canneyt FPCTarget => 3.2.0
2020-01-20 19:25 Michael Van Canneyt Note Added: 0120572
2020-01-20 20:26 Pascal Riekenberg Status resolved => closed
2020-01-20 20:26 Pascal Riekenberg Note Added: 0120574