From 1c70372cc3b70fe3bbabac7587693159fdf67292 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 9 Jul 2020 07:25:03 +0000 Subject: [PATCH] * Fix from Pascal Riekenberg for bug ID #37309 (font search failure) git-svn-id: trunk@45744 - --- packages/fcl-report/src/fpreportpdfexport.pp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/fcl-report/src/fpreportpdfexport.pp b/packages/fcl-report/src/fpreportpdfexport.pp index b93425f53d..6135d2709a 100644 --- a/packages/fcl-report/src/fpreportpdfexport.pp +++ b/packages/fcl-report/src/fpreportpdfexport.pp @@ -124,14 +124,11 @@ begin 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;