Kaynağa Gözat

* Search with Postscript font name and humanreadable font name

git-svn-id: trunk@43806 -
michael 5 yıl önce
ebeveyn
işleme
f01495668e
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      packages/fcl-report/src/fpreportpdfexport.pp

+ 6 - 2
packages/fcl-report/src/fpreportpdfexport.pp

@@ -126,8 +126,12 @@ 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
-        raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
+      else 
+        begin
+        fnt:=gTTFontCache.FindFont(AFontName);
+        if fnt=Nil then
+          raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
+        end;
     end;
   end;
 end;