mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:09:17 +02:00
* Fix bug #34062, invalid length1 for compressed fonts, using provided patch
git-svn-id: trunk@39529 -
This commit is contained in:
parent
6e85976561
commit
67adab1155
@ -4690,11 +4690,16 @@ end;
|
|||||||
procedure TPDFDocument.CreateFontFileEntry(const AFontNum: integer);
|
procedure TPDFDocument.CreateFontFileEntry(const AFontNum: integer);
|
||||||
var
|
var
|
||||||
FDict: TPDFDictionary;
|
FDict: TPDFDictionary;
|
||||||
|
Len: Integer;
|
||||||
begin
|
begin
|
||||||
FDict:=CreateGlobalXRef.Dict;
|
FDict:=CreateGlobalXRef.Dict;
|
||||||
if poCompressFonts in Options then
|
if poCompressFonts in Options then
|
||||||
FDict.AddName('Filter','FlateDecode');
|
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;
|
end;
|
||||||
|
|
||||||
procedure TPDFDocument.CreateCIDSet(const AFontNum: integer);
|
procedure TPDFDocument.CreateCIDSet(const AFontNum: integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user