* Fix bug #34062, invalid length1 for compressed fonts, using provided patch

git-svn-id: trunk@39529 -
This commit is contained in:
michael 2018-07-30 13:52:48 +00:00
parent 6e85976561
commit 67adab1155

View File

@ -4690,11 +4690,16 @@ end;
procedure TPDFDocument.CreateFontFileEntry(const AFontNum: integer);
var
FDict: TPDFDictionary;
Len: Integer;
begin
FDict:=CreateGlobalXRef.Dict;
if poCompressFonts in Options then
FDict.AddName('Filter','FlateDecode');
FDict.AddInteger('Length1 '+IntToStr(AFontNum), Fonts[AFontNum].FTrueTypeFile.OriginalSize);
if poSubsetFont in Options then
Len := Fonts[AFontNum].SubsetFont.Size
else
Len := Fonts[AFontNum].FTrueTypeFile.OriginalSize;
FDict.AddInteger('Length1 '+IntToStr(AFontNum), Len);
end;
procedure TPDFDocument.CreateCIDSet(const AFontNum: integer);