View Issue Details

IDProjectCategoryView StatusLast Update
0037309FPCfpReportpublic2020-07-09 09:32
ReporterPascal Riekenberg Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindows 10 x64 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037309: bug in fpreportpdfexport.pp: Font not added and Result not set
DescriptionTFPReportExportPDF.FindFontIndex:

Font ist not added to document and Result is not set when Font isn't found as PostScript Name but as fontname.
Steps To ReproduceAttached patch fixes this.
TagsNo tags attached.
Fixed in Revision45744
FPCOldBugId
FPCTarget4.0.0
Attached Files

Activities

Pascal Riekenberg

2020-07-07 14:25

reporter  

fpreportpdfexport.pp.patch (981 bytes)   
Index: packages/fcl-report/src/fpreportpdfexport.pp
===================================================================
--- packages/fcl-report/src/fpreportpdfexport.pp	(revision 45737)
+++ packages/fcl-report/src/fpreportpdfexport.pp	(working copy)
@@ -124,14 +124,11 @@
     else
     begin
       fnt := gTTFontCache.Find(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info)
-      if Assigned(fnt) then
-        Result := Document.AddFont(fnt.FileName, AFontName)
-      else 
-        begin
+      if not Assigned(fnt) then
         fnt:=gTTFontCache.FindFont(AFontName);
-        if fnt=Nil then
-          raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
-        end;
+      if fnt=Nil then
+        raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
+      Result := Document.AddFont(fnt.FileName, AFontName)
     end;
   end;
 end;
fpreportpdfexport.pp.patch (981 bytes)   

Michael Van Canneyt

2020-07-09 09:25

administrator   ~0123837

Fixed, thanks for reporting!

Issue History

Date Modified Username Field Change
2020-07-07 14:25 Pascal Riekenberg New Issue
2020-07-07 14:25 Pascal Riekenberg Status new => assigned
2020-07-07 14:25 Pascal Riekenberg Assigned To => Michael Van Canneyt
2020-07-07 14:25 Pascal Riekenberg File Added: fpreportpdfexport.pp.patch
2020-07-09 09:25 Michael Van Canneyt Status assigned => resolved
2020-07-09 09:25 Michael Van Canneyt Resolution open => fixed
2020-07-09 09:25 Michael Van Canneyt Fixed in Version => 3.3.1
2020-07-09 09:25 Michael Van Canneyt Fixed in Revision => 45744
2020-07-09 09:25 Michael Van Canneyt FPCTarget => 4.0.0
2020-07-09 09:25 Michael Van Canneyt Note Added: 0123837
2020-07-09 09:32 Pascal Riekenberg Status resolved => closed